移动端V1.0
This commit is contained in:
284
pages/stuGood/goodstudent/apply.vue
Normal file
284
pages/stuGood/goodstudent/apply.vue
Normal file
@@ -0,0 +1,284 @@
|
||||
<template>
|
||||
<view class="add">
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>政治面貌</label>
|
||||
<picker :range="politicsOptions" @change="onPoliticsChange">
|
||||
<view class="uni-input">
|
||||
<text class="val">{{ politicsOptions[selectedPoliticsOptionIndex] || '请选择政治面貌' }}</text>
|
||||
<uni-icons type="down" size="16" color="#202020"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>第二课堂学分认定</label>
|
||||
<picker :range="secondClassAchievement" @change="onSecondClassAchievementChange">
|
||||
<view class="uni-input">
|
||||
<text class="val">{{ secondClassAchievement[secondClassAchievementIndex] || '请选择成绩认定' }}</text>
|
||||
<uni-icons type="down" size="16" color="#202020"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>青年大学习学习率</label>
|
||||
<input type="text" v-model="valiFormData.youthPercent" placeholder="单位为%" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>职务</label>
|
||||
<input type="text" v-model="valiFormData.classPost" placeholder="(例如:班长,没有填 无)" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>获奖情况</label>
|
||||
<textarea placeholder="请输入" v-model="valiFormData.goodHis"></textarea>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>主要事迹</label>
|
||||
<textarea class="main-his" placeholder="字数100字以上" v-model="valiFormData.mainHis"></textarea>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button @click="onSubmit" :disabled="isSubmitting">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
toBackPage
|
||||
} from "@/utils/toBack.js"
|
||||
import {
|
||||
validateFormFields
|
||||
} from "@/utils/validateForm.js"
|
||||
import {
|
||||
goodStuApply,
|
||||
verifyApplySHXS
|
||||
} from "@/api/good/shxs.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isSubmitting: false, //表单提交标志位
|
||||
// 校验表单数据
|
||||
valiFormData: {
|
||||
zzmm: '',
|
||||
classtwoSure: '',
|
||||
youthPercent: '',
|
||||
classPost: '',
|
||||
goodHis: '',
|
||||
mainHis: '',
|
||||
},
|
||||
politicsOptions: ['群众', '共青团员', '党员'], // 政治面貌
|
||||
selectedPoliticsOptionIndex: -1, // 当前选中的政治面貌索引
|
||||
secondClassAchievement: ["合格", "不合格"], // 学年
|
||||
secondClassAchievementIndex: -1, // 当前选中的学年索引
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
//选择成绩认定
|
||||
onSecondClassAchievementChange(e) {
|
||||
this.secondClassAchievementIndex = e.detail.value;
|
||||
this.valiFormData.classtwoSure = this.secondClassAchievement[this.secondClassAchievementIndex];
|
||||
},
|
||||
//选择政治面貌
|
||||
onPoliticsChange(e) {
|
||||
this.selectedPoliticsOptionIndex = e.detail.value;
|
||||
this.valiFormData.zzmm = this.politicsOptions[this.selectedPoliticsOptionIndex];
|
||||
},
|
||||
onSubmit() {
|
||||
const requiredFields = [
|
||||
'zzmm',
|
||||
'classtwoSure',
|
||||
'youthPercent',
|
||||
'classPost',
|
||||
'goodHis',
|
||||
'mainHis',
|
||||
];
|
||||
if (!validateFormFields(requiredFields, this.valiFormData)) {
|
||||
return;
|
||||
}
|
||||
if (this.valiFormData.mainHis.length < 100) {
|
||||
uni.showToast({
|
||||
title: "主要事迹字数需要100字以上",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.isSubmitting = true; // 设置为正在提交
|
||||
uni.showLoading({
|
||||
title: "正在提交",
|
||||
success: () => {
|
||||
goodStuApply(this.valiFormData).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: "申请成功"
|
||||
})
|
||||
this.isSubmitting = false;
|
||||
toBackPage(500, (page) => {
|
||||
page.getList();
|
||||
this.isSubmitting = false;
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.add {
|
||||
background-color: #F5F5F7;
|
||||
padding: 10px;
|
||||
padding-bottom: 80px;
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 22rpx 40rpx;
|
||||
background-color: white;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
.tip {
|
||||
color: red;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom: 20rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
height: 70rpx;
|
||||
padding-left: 30rpx;
|
||||
|
||||
.input-placeholder {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
height:250rpx;
|
||||
padding: 30rpx;
|
||||
&.main-his{
|
||||
height:500rpx;
|
||||
}
|
||||
.input-placeholder {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
}
|
||||
|
||||
picker {
|
||||
border: 1px solid #E1E1E1;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
padding: 0 30rpx;
|
||||
|
||||
text {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
|
||||
.uni-input {
|
||||
display: flex;
|
||||
color: #797979;
|
||||
|
||||
.val {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upload-img {
|
||||
border: 1px solid #E1E1E1;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.tip {
|
||||
margin-top: 15rpx;
|
||||
color: #7a7a7a;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.img-list {
|
||||
border: 1px solid #D8D8D8;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.imgs {
|
||||
padding: 22rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.img {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
height: 170rpx;
|
||||
margin-bottom: 15rpx;
|
||||
margin-right: 15rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.remove {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.btn {
|
||||
border-top: 1px solid #D8D8D8;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
background: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
background-color: #1890FF;
|
||||
color: white;
|
||||
|
||||
&[disabled] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
300
pages/stuGood/goodstudent/detail.vue
Normal file
300
pages/stuGood/goodstudent/detail.vue
Normal file
@@ -0,0 +1,300 @@
|
||||
<template>
|
||||
<view class="add">
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>政治面貌</label>
|
||||
<picker :range="politicsOptions" @change="onPoliticsChange">
|
||||
<view class="uni-input">
|
||||
<text class="val">{{ politicsOptions[selectedPoliticsOptionIndex] || '请选择政治面貌' }}</text>
|
||||
<uni-icons type="down" size="16" color="#202020"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>第二课堂学分认定</label>
|
||||
<picker :range="secondClassAchievement" @change="onSecondClassAchievementChange">
|
||||
<view class="uni-input">
|
||||
<text class="val">{{ secondClassAchievement[secondClassAchievementIndex] || '请选择成绩认定' }}</text>
|
||||
<uni-icons type="down" size="16" color="#202020"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>青年大学习学习率</label>
|
||||
<input type="text" v-model="valiFormData.youthPercent" placeholder="单位为%" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>职务</label>
|
||||
<input type="text" v-model="valiFormData.classPost" placeholder="(例如:班长,没有填 无)" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>获奖情况</label>
|
||||
<textarea placeholder="请输入" v-model="valiFormData.goodHis"></textarea>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>主要事迹</label>
|
||||
<textarea class="main-his" placeholder="字数100字以上" v-model="valiFormData.mainHis"></textarea>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button @click="onReSubmit" :disabled="isSubmitting" v-if="detail.applyStatus==10">重新提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
toBackPage
|
||||
} from "@/utils/toBack.js"
|
||||
import {
|
||||
validateFormFields
|
||||
} from "@/utils/validateForm.js"
|
||||
import {
|
||||
goodStuApply,
|
||||
verifyApplySHXS,
|
||||
reApply
|
||||
} from "@/api/good/shxs.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isSubmitting: false, //表单提交标志位
|
||||
detail: null,
|
||||
// 校验表单数据
|
||||
valiFormData: {
|
||||
zzmm: '',
|
||||
classtwoSure: '',
|
||||
youthPercent: '',
|
||||
classPost: '',
|
||||
goodHis: '',
|
||||
mainHis: '',
|
||||
},
|
||||
politicsOptions: ['群众', '共青团员', '党员'], // 政治面貌
|
||||
selectedPoliticsOptionIndex: -1, // 当前选中的政治面貌索引
|
||||
secondClassAchievement: ["合格", "不合格"], // 学年
|
||||
secondClassAchievementIndex: -1, // 当前选中的学年索引
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.detail = JSON.parse(option.detail);
|
||||
this.valiFormData = this.detail;
|
||||
this.politicsOptions.forEach((item, index) => {
|
||||
if (item == this.valiFormData.zzmm) {
|
||||
this.selectedPoliticsOptionIndex = index;
|
||||
}
|
||||
})
|
||||
this.secondClassAchievement.forEach((item, index) => {
|
||||
if (item == this.valiFormData.classtwoSure) {
|
||||
this.secondClassAchievementIndex = index;
|
||||
}
|
||||
})
|
||||
console.log(this.valiFormData);
|
||||
},
|
||||
methods: {
|
||||
//选择成绩认定
|
||||
onSecondClassAchievementChange(e) {
|
||||
this.secondClassAchievementIndex = e.detail.value;
|
||||
this.valiFormData.classtwoSure = this.secondClassAchievement[this.secondClassAchievementIndex];
|
||||
},
|
||||
//选择政治面貌
|
||||
onPoliticsChange(e) {
|
||||
this.selectedPoliticsOptionIndex = e.detail.value;
|
||||
this.valiFormData.zzmm = this.politicsOptions[this.selectedPoliticsOptionIndex];
|
||||
},
|
||||
onReSubmit() {
|
||||
const requiredFields = [
|
||||
'zzmm',
|
||||
'classtwoSure',
|
||||
'youthPercent',
|
||||
'classPost',
|
||||
'goodHis',
|
||||
'mainHis',
|
||||
];
|
||||
if (!validateFormFields(requiredFields, this.valiFormData)) {
|
||||
return;
|
||||
}
|
||||
if (this.valiFormData.mainHis.length < 100) {
|
||||
uni.showToast({
|
||||
title: "主要事迹字数需要100字以上",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
console.log(this.valiFormData);
|
||||
this.isSubmitting = true; // 设置为正在提交
|
||||
uni.showLoading({
|
||||
title: "正在提交",
|
||||
success: () => {
|
||||
reApply(this.valiFormData).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: "重新提交成功"
|
||||
})
|
||||
toBackPage(500, (page) => {
|
||||
page.getList();
|
||||
this.isSubmitting = false;
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.add {
|
||||
background-color: #F5F5F7;
|
||||
padding: 10px;
|
||||
padding-bottom: 80px;
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 22rpx 40rpx;
|
||||
background-color: white;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
.tip {
|
||||
color: red;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom: 20rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
height: 70rpx;
|
||||
padding-left: 30rpx;
|
||||
|
||||
.input-placeholder {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
height:250rpx;
|
||||
padding: 30rpx;
|
||||
&.main-his{
|
||||
height:500rpx;
|
||||
}
|
||||
.input-placeholder {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
}
|
||||
|
||||
picker {
|
||||
border: 1px solid #E1E1E1;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
padding: 0 30rpx;
|
||||
|
||||
text {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
|
||||
.uni-input {
|
||||
display: flex;
|
||||
color: #797979;
|
||||
|
||||
.val {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upload-img {
|
||||
border: 1px solid #E1E1E1;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.tip {
|
||||
margin-top: 15rpx;
|
||||
color: #7a7a7a;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.img-list {
|
||||
border: 1px solid #D8D8D8;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.imgs {
|
||||
padding: 22rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.img {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
height: 170rpx;
|
||||
margin-bottom: 15rpx;
|
||||
margin-right: 15rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.remove {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.btn {
|
||||
border-top: 1px solid #D8D8D8;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
background: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
background-color: #1890FF;
|
||||
color: white;
|
||||
|
||||
&[disabled] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
369
pages/stuGood/goodstudent/index.vue
Normal file
369
pages/stuGood/goodstudent/index.vue
Normal file
File diff suppressed because one or more lines are too long
100
pages/stuGood/index.vue
Normal file
100
pages/stuGood/index.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<view class="instructor-index">
|
||||
<view class="panel">
|
||||
<view class="title">
|
||||
评优评先
|
||||
</view>
|
||||
<view class="grid">
|
||||
<view class="grid-item" @tap="toScholarship">
|
||||
<image src="../../static/images/stuGood/scholarship.png" mode="aspectFill"></image>
|
||||
<text>学业奖学金</text>
|
||||
</view>
|
||||
<view class="grid-item" @tap="toGoodstudent">
|
||||
<image src="../../static/images/stuGood/goodstudent.png" mode="aspectFill"></image>
|
||||
<text>三好学生</text>
|
||||
</view>
|
||||
<view class="grid-item" @tap="toOutstandingStudentLeader">
|
||||
<image src="../../static/images/stuGood/outstandingStudentLeader.png" mode="aspectFill"></image>
|
||||
<text>优秀学生干部</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toScholarship() {
|
||||
uni.navigateTo({
|
||||
url: "./scholarship/index"
|
||||
})
|
||||
},
|
||||
toGoodstudent() {
|
||||
uni.navigateTo({
|
||||
url: "./goodstudent/index"
|
||||
})
|
||||
},
|
||||
toOutstandingStudentLeader() {
|
||||
uni.navigateTo({
|
||||
url: "./outstandingStudentLeader/index"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.instructor-index {
|
||||
height: calc(100vh - 44px);
|
||||
background-color: #F5F5F7;
|
||||
padding: 40rpx 40rpx;
|
||||
|
||||
.panel {
|
||||
background-color: white;
|
||||
padding: 30rpx 0;
|
||||
border-radius: 15rpx;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 0 40rpx 40rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
height: 25rpx;
|
||||
border-radius: 20rpx;
|
||||
width: 8rpx;
|
||||
background-color: #1890FF;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: flex;
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 25%;
|
||||
font-size: 26rpx;
|
||||
|
||||
image {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
289
pages/stuGood/outstandingStudentLeader/apply.vue
Normal file
289
pages/stuGood/outstandingStudentLeader/apply.vue
Normal file
@@ -0,0 +1,289 @@
|
||||
<template>
|
||||
<view class="add">
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>政治面貌</label>
|
||||
<picker :range="politicsOptions" @change="onPoliticsChange">
|
||||
<view class="uni-input">
|
||||
<text class="val">{{ politicsOptions[selectedPoliticsOptionIndex] || '请选择政治面貌' }}</text>
|
||||
<uni-icons type="down" size="16" color="#202020"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>第二课堂学分认定</label>
|
||||
<picker :range="secondClassAchievement" @change="onSecondClassAchievementChange">
|
||||
<view class="uni-input">
|
||||
<text class="val">{{ secondClassAchievement[secondClassAchievementIndex] || '请选择成绩认定' }}</text>
|
||||
<uni-icons type="down" size="16" color="#202020"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>青年大学习学习率</label>
|
||||
<input type="text" v-model="valiFormData.youthPercent" placeholder="单位为%" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>职务</label>
|
||||
<input type="text" v-model="valiFormData.classPost" placeholder="(例如:班长,没有填 无)" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>获奖情况</label>
|
||||
<textarea placeholder-class="input-placeholder" placeholder="请输入获奖情况"
|
||||
v-model="valiFormData.goodHis"></textarea>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>主要事迹</label>
|
||||
<textarea class="main-his" placeholder-class="input-placeholder" placeholder="输入主要事迹,字数100字以上"
|
||||
v-model="valiFormData.mainHis"></textarea>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button @click="onSubmit" :disabled="isSubmitting">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
toBackPage
|
||||
} from "@/utils/toBack.js"
|
||||
import {
|
||||
validateFormFields
|
||||
} from "@/utils/validateForm.js"
|
||||
import {
|
||||
addApplyYxgb
|
||||
} from "@/api/good/yxbg.js";
|
||||
import {
|
||||
listXyjxjCanType
|
||||
} from "@/api/good/index.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isSubmitting: false, //表单提交标志位
|
||||
// 校验表单数据
|
||||
valiFormData: {
|
||||
zzmm: '',
|
||||
classtwoSure:'',
|
||||
youthPercent:'',
|
||||
classPost: '',
|
||||
goodHis: '',
|
||||
mainHis: ''
|
||||
},
|
||||
politicsOptions: ['群众', '共青团员', '党员'], // 政治面貌
|
||||
selectedPoliticsOptionIndex: -1, // 当前选中的政治面貌索引
|
||||
secondClassAchievement: ["合格", "不合格"], // 学年
|
||||
secondClassAchievementIndex: -1 // 当前选中的学年索引
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//选择政治面貌
|
||||
onPoliticsChange(e) {
|
||||
this.selectedPoliticsOptionIndex = e.detail.value;
|
||||
this.valiFormData.zzmm = this.politicsOptions[this.selectedPoliticsOptionIndex];
|
||||
},
|
||||
//选择成绩认定
|
||||
onSecondClassAchievementChange(e) {
|
||||
this.secondClassAchievementIndex = e.detail.value;
|
||||
this.valiFormData.classtwoSure = this.secondClassAchievement[this.secondClassAchievementIndex];
|
||||
},
|
||||
onSubmit() {
|
||||
console.log(this.valiFormData);
|
||||
const requiredFields = [
|
||||
'zzmm',
|
||||
'classtwoSure',
|
||||
'youthPercent',
|
||||
'classPost',
|
||||
'goodHis',
|
||||
'mainHis',
|
||||
];
|
||||
if (!validateFormFields(requiredFields, this.valiFormData)) {
|
||||
return;
|
||||
}
|
||||
if (this.valiFormData.mainHis.length < 100) {
|
||||
uni.showToast({
|
||||
title: "主要事迹字数需要100字以上",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.isSubmitting = true; // 设置为正在提交
|
||||
uni.showLoading({
|
||||
title: "正在提交",
|
||||
success: () => {
|
||||
addApplyYxgb(this.valiFormData).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: "申请成功"
|
||||
})
|
||||
this.isSubmitting = false;
|
||||
toBackPage(500, (page) => {
|
||||
page.getList();
|
||||
this.isSubmitting = false;
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.add {
|
||||
background-color: #F5F5F7;
|
||||
padding: 10px;
|
||||
padding-bottom: 80px;
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 22rpx 40rpx;
|
||||
background-color: white;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
.tip {
|
||||
color: red;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom: 20rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
height: 70rpx;
|
||||
padding-left: 30rpx;
|
||||
|
||||
.input-placeholder {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
height: 250rpx;
|
||||
padding: 30rpx;
|
||||
|
||||
&.main-his {
|
||||
height: 500rpx;
|
||||
}
|
||||
|
||||
.input-placeholder {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
}
|
||||
|
||||
picker {
|
||||
border: 1px solid #E1E1E1;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
padding: 0 30rpx;
|
||||
|
||||
text {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
|
||||
.uni-input {
|
||||
display: flex;
|
||||
color: #797979;
|
||||
|
||||
.val {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upload-img {
|
||||
border: 1px solid #E1E1E1;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.tip {
|
||||
margin-top: 15rpx;
|
||||
color: #7a7a7a;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.img-list {
|
||||
border: 1px solid #D8D8D8;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.imgs {
|
||||
padding: 22rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.img {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
height: 170rpx;
|
||||
margin-bottom: 15rpx;
|
||||
margin-right: 15rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.remove {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.btn {
|
||||
border-top: 1px solid #D8D8D8;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
background: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
background-color: #1890FF;
|
||||
color: white;
|
||||
|
||||
&[disabled] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
298
pages/stuGood/outstandingStudentLeader/detail.vue
Normal file
298
pages/stuGood/outstandingStudentLeader/detail.vue
Normal file
@@ -0,0 +1,298 @@
|
||||
<template>
|
||||
<view class="add">
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>政治面貌</label>
|
||||
<picker :range="politicsOptions" @change="onPoliticsChange">
|
||||
<view class="uni-input">
|
||||
<text class="val">{{ politicsOptions[selectedPoliticsOptionIndex] || '请选择政治面貌' }}</text>
|
||||
<uni-icons type="down" size="16" color="#202020"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>第二课堂学分认定</label>
|
||||
<picker :range="secondClassAchievement" @change="onSecondClassAchievementChange">
|
||||
<view class="uni-input">
|
||||
<text class="val">{{ secondClassAchievement[secondClassAchievementIndex] || '请选择成绩认定' }}</text>
|
||||
<uni-icons type="down" size="16" color="#202020"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>青年大学习学习率</label>
|
||||
<input type="text" v-model="valiFormData.youthPercent" placeholder="单位为%" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>职务</label>
|
||||
<input type="text" v-model="valiFormData.classPost" placeholder="(例如:班长,没有填 无)" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>获奖情况</label>
|
||||
<textarea placeholder="请输入" v-model="valiFormData.goodHis"></textarea>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>主要事迹</label>
|
||||
<textarea class="main-his" placeholder="字数100字以上" v-model="valiFormData.mainHis"></textarea>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button @click="onReSubmit" :disabled="isSubmitting" v-if="detail.status==10">重新提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
toBackPage
|
||||
} from "@/utils/toBack.js"
|
||||
import {
|
||||
validateFormFields
|
||||
} from "@/utils/validateForm.js"
|
||||
import {
|
||||
reApplyYXG
|
||||
} from "@/api/good/yxbg.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isSubmitting: false, //表单提交标志位
|
||||
detail: null,
|
||||
// 校验表单数据
|
||||
valiFormData: {
|
||||
zzmm: '',
|
||||
classtwoSure: '',
|
||||
youthPercent: '',
|
||||
classPost: '',
|
||||
goodHis: '',
|
||||
mainHis: '',
|
||||
},
|
||||
politicsOptions: ['群众', '共青团员', '党员'], // 政治面貌
|
||||
selectedPoliticsOptionIndex: -1, // 当前选中的政治面貌索引
|
||||
secondClassAchievement: ["合格", "不合格"], // 学年
|
||||
secondClassAchievementIndex: -1, // 当前选中的学年索引
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.detail = JSON.parse(option.detail);
|
||||
this.valiFormData = this.detail;
|
||||
this.politicsOptions.forEach((item, index) => {
|
||||
if (item == this.valiFormData.zzmm) {
|
||||
this.selectedPoliticsOptionIndex = index;
|
||||
}
|
||||
})
|
||||
this.secondClassAchievement.forEach((item, index) => {
|
||||
if (item == this.valiFormData.classtwoSure) {
|
||||
this.secondClassAchievementIndex = index;
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
//选择成绩认定
|
||||
onSecondClassAchievementChange(e) {
|
||||
this.secondClassAchievementIndex = e.detail.value;
|
||||
this.valiFormData.classtwoSure = this.secondClassAchievement[this.secondClassAchievementIndex];
|
||||
},
|
||||
//选择政治面貌
|
||||
onPoliticsChange(e) {
|
||||
this.selectedPoliticsOptionIndex = e.detail.value;
|
||||
this.valiFormData.zzmm = this.politicsOptions[this.selectedPoliticsOptionIndex];
|
||||
},
|
||||
onReSubmit() {
|
||||
console.log(this.valiFormData);
|
||||
const requiredFields = [
|
||||
'zzmm',
|
||||
'classtwoSure',
|
||||
'youthPercent',
|
||||
'classPost',
|
||||
'goodHis',
|
||||
'mainHis',
|
||||
];
|
||||
if (!validateFormFields(requiredFields, this.valiFormData)) {
|
||||
return;
|
||||
}
|
||||
if (this.valiFormData.mainHis.length < 100) {
|
||||
uni.showToast({
|
||||
title: "主要事迹字数需要100字以上",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.isSubmitting = true; // 设置为正在提交
|
||||
uni.showLoading({
|
||||
title: "正在提交",
|
||||
success: () => {
|
||||
this.valiFormData.applyId = this.valiFormData.id;
|
||||
reApplyYXG(this.valiFormData).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: "重新提交成功"
|
||||
})
|
||||
toBackPage(500, (page) => {
|
||||
page.getList();
|
||||
this.isSubmitting = false;
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.add {
|
||||
background-color: #F5F5F7;
|
||||
padding: 10px;
|
||||
padding-bottom: 80px;
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 22rpx 40rpx;
|
||||
background-color: white;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
.tip {
|
||||
color: red;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom: 20rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
height: 70rpx;
|
||||
padding-left: 30rpx;
|
||||
|
||||
.input-placeholder {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
height:250rpx;
|
||||
padding: 30rpx;
|
||||
&.main-his{
|
||||
height:500rpx;
|
||||
}
|
||||
.input-placeholder {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
}
|
||||
|
||||
picker {
|
||||
border: 1px solid #E1E1E1;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
padding: 0 30rpx;
|
||||
|
||||
text {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
|
||||
.uni-input {
|
||||
display: flex;
|
||||
color: #797979;
|
||||
|
||||
.val {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upload-img {
|
||||
border: 1px solid #E1E1E1;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.tip {
|
||||
margin-top: 15rpx;
|
||||
color: #7a7a7a;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.img-list {
|
||||
border: 1px solid #D8D8D8;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.imgs {
|
||||
padding: 22rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.img {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
height: 170rpx;
|
||||
margin-bottom: 15rpx;
|
||||
margin-right: 15rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.remove {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.btn {
|
||||
border-top: 1px solid #D8D8D8;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
background: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
background-color: #1890FF;
|
||||
color: white;
|
||||
|
||||
&[disabled] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
365
pages/stuGood/outstandingStudentLeader/index.vue
Normal file
365
pages/stuGood/outstandingStudentLeader/index.vue
Normal file
File diff suppressed because one or more lines are too long
321
pages/stuGood/scholarship/apply.vue
Normal file
321
pages/stuGood/scholarship/apply.vue
Normal file
@@ -0,0 +1,321 @@
|
||||
<template>
|
||||
<view class="add">
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>奖项</label>
|
||||
<picker v-if="awardsList.length>0" range-key="typeName" :range="awardsList" @change="onAwardsChange">
|
||||
<view class="uni-input">
|
||||
<text class="val">{{ awardsList[awardsIndex].typeName}}</text>
|
||||
<uni-icons type="down" size="16" color="#202020"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>政治面貌</label>
|
||||
<picker :range="politicsOptions" @change="onPoliticsChange">
|
||||
<view class="uni-input">
|
||||
<text class="val">{{ politicsOptions[selectedPoliticsOptionIndex] || '请选择政治面貌' }}</text>
|
||||
<uni-icons type="down" size="16" color="#202020"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>职务</label>
|
||||
<input type="text" v-model="valiFormData.classPost" placeholder="(例如:班长,没有填 无)" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>中国农业银行银行卡号</label>
|
||||
<input type="number" v-model="valiFormData.bankCard" placeholder="请输入中国农业银行银行卡号" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>开户行</label>
|
||||
<input type="text" v-model="valiFormData.bankAddr" placeholder="例如:中国农业银行南宁望州支行" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>获奖情况</label>
|
||||
<textarea placeholder-class="input-placeholder" placeholder="请输入获奖情况" v-model="valiFormData.goodHis"></textarea>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>主要事迹</label>
|
||||
<textarea class="main-his" placeholder-class="input-placeholder" placeholder="输入主要事迹,字数100字以上" v-model="valiFormData.mainHis"></textarea>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button @click="onSubmit" :disabled="isSubmitting">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
toBackPage
|
||||
} from "@/utils/toBack.js"
|
||||
import {
|
||||
validateFormFields
|
||||
} from "@/utils/validateForm.js"
|
||||
import {
|
||||
applyXyjxj
|
||||
} from "@/api/good/xyjxj.js";
|
||||
import {
|
||||
alipayVali
|
||||
} from "@/api/helpFunc/bank.js";
|
||||
import {
|
||||
listXyjxjCanType
|
||||
} from "@/api/good/index.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isSubmitting: false, //表单提交标志位
|
||||
awardsList: [], //奖项
|
||||
awardsIndex: 0,
|
||||
// 校验表单数据
|
||||
valiFormData: {
|
||||
typeCode: '',
|
||||
zzmm: '',
|
||||
classPost: '',
|
||||
bankCard: '',
|
||||
bankAddr: '',
|
||||
goodHis: '',
|
||||
mainHis: '',
|
||||
},
|
||||
politicsOptions: ['群众', '共青团员', '党员'], // 政治面貌
|
||||
selectedPoliticsOptionIndex: -1, // 当前选中的政治面貌索引
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getAwardsList();
|
||||
},
|
||||
methods: {
|
||||
async getAwardsList() {
|
||||
let res = await listXyjxjCanType();
|
||||
if (res.code == 200) {
|
||||
this.awardsList = res.data;
|
||||
this.valiFormData.typeCode = this.awardsList[this.awardsIndex].typeCode;
|
||||
}
|
||||
},
|
||||
//选择奖项
|
||||
onAwardsChange(e) {
|
||||
this.awardsIndex = e.detail.value;
|
||||
this.valiFormData.typeCode = this.awardsList[this.awardsIndex].typeCode;
|
||||
},
|
||||
//选择政治面貌
|
||||
onPoliticsChange(e) {
|
||||
this.selectedPoliticsOptionIndex = e.detail.value;
|
||||
this.valiFormData.zzmm = this.politicsOptions[this.selectedPoliticsOptionIndex];
|
||||
},
|
||||
async onSubmit() {
|
||||
const requiredFields = [
|
||||
'zzmm',
|
||||
'classPost',
|
||||
'bankCard',
|
||||
'bankAddr',
|
||||
'goodHis',
|
||||
'mainHis',
|
||||
];
|
||||
if (!validateFormFields(requiredFields, this.valiFormData)) {
|
||||
return;
|
||||
}
|
||||
let boolCard = await alipayVali(this.valiFormData.bankCard);
|
||||
if (boolCard.validated == false) {
|
||||
uni.showToast({
|
||||
title: "请输入正确的银行卡号",
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
if (boolCard.bank != "ABC") {
|
||||
uni.showToast({
|
||||
title: "请输入正确的中国农业银行银行卡号",
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (this.valiFormData.mainHis.length < 100) {
|
||||
uni.showToast({
|
||||
title: "主要事迹字数需要100字以上",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.isSubmitting = true; // 设置为正在提交
|
||||
uni.showLoading({
|
||||
title: "正在提交",
|
||||
success: () => {
|
||||
applyXyjxj(this.valiFormData).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: "申请成功"
|
||||
})
|
||||
this.isSubmitting = false;
|
||||
toBackPage(500, (page) => {
|
||||
page.getList();
|
||||
this.isSubmitting = false;
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.add {
|
||||
background-color: #F5F5F7;
|
||||
padding: 10px;
|
||||
padding-bottom: 80px;
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 22rpx 40rpx;
|
||||
background-color: white;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
.tip {
|
||||
color: red;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom: 20rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
height: 70rpx;
|
||||
padding-left: 30rpx;
|
||||
|
||||
.input-placeholder {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
height: 250rpx;
|
||||
padding: 30rpx;
|
||||
|
||||
&.main-his {
|
||||
height: 500rpx;
|
||||
}
|
||||
|
||||
.input-placeholder {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
}
|
||||
|
||||
picker {
|
||||
border: 1px solid #E1E1E1;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
padding: 0 30rpx;
|
||||
|
||||
text {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
|
||||
.uni-input {
|
||||
display: flex;
|
||||
color: #797979;
|
||||
|
||||
.val {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upload-img {
|
||||
border: 1px solid #E1E1E1;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.tip {
|
||||
margin-top: 15rpx;
|
||||
color: #7a7a7a;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.img-list {
|
||||
border: 1px solid #D8D8D8;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.imgs {
|
||||
padding: 22rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.img {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
height: 170rpx;
|
||||
margin-bottom: 15rpx;
|
||||
margin-right: 15rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.remove {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.btn {
|
||||
border-top: 1px solid #D8D8D8;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
background: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
background-color: #1890FF;
|
||||
color: white;
|
||||
|
||||
&[disabled] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
325
pages/stuGood/scholarship/detail.vue
Normal file
325
pages/stuGood/scholarship/detail.vue
Normal file
@@ -0,0 +1,325 @@
|
||||
<template>
|
||||
<view class="add">
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>政治面貌</label>
|
||||
<picker :range="politicsOptions" @change="onPoliticsChange">
|
||||
<view class="uni-input">
|
||||
<text class="val">{{ politicsOptions[selectedPoliticsOptionIndex] || '请选择政治面貌' }}</text>
|
||||
<uni-icons type="down" size="16" color="#202020"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>职务</label>
|
||||
<input type="text" v-model="valiFormData.classPost" placeholder="(例如:班长,没有填 无)" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>中国农业银行银行卡号</label>
|
||||
<input type="number" v-model="valiFormData.bankCard" placeholder="请输入中国农业银行银行卡号" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>开户行</label>
|
||||
<input type="text" v-model="valiFormData.bankAddr" placeholder="例如:中国农业银行南宁望州支行" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>获奖情况</label>
|
||||
<textarea placeholder="请输入获奖情况" v-model="valiFormData.goodHis"></textarea>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="tip">*</text>主要事迹</label>
|
||||
<textarea class="main-his" placeholder="输入主要事迹,字数100字以上" v-model="valiFormData.mainHis"></textarea>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button v-if="valiFormData.applyStatus==10" @click="onReSubmit" :disabled="isSubmitting">重新提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
toBackPage
|
||||
} from "@/utils/toBack.js"
|
||||
import {
|
||||
validateFormFields
|
||||
} from "@/utils/validateForm.js"
|
||||
import {
|
||||
reApply
|
||||
} from "@/api/good/xyjxj.js";
|
||||
import {
|
||||
alipayVali
|
||||
} from "@/api/helpFunc/bank.js";
|
||||
import {
|
||||
listXyjxjCanType
|
||||
} from "@/api/good/index.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isSubmitting: false, //表单提交标志位
|
||||
awardsList: [], //奖项
|
||||
awardsIndex: 0,
|
||||
// 校验表单数据
|
||||
valiFormData: {
|
||||
typeCode: '',
|
||||
zzmm: '',
|
||||
classPost: '',
|
||||
bankCard: '',
|
||||
bankAddr: '',
|
||||
goodHis: '',
|
||||
mainHis: '',
|
||||
},
|
||||
politicsOptions: ['群众', '共青团员', '党员'], // 政治面貌
|
||||
selectedPoliticsOptionIndex: -1, // 当前选中的政治面貌索引
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.getAwardsList();
|
||||
this.detail = JSON.parse(option.detail);
|
||||
this.valiFormData = this.detail;
|
||||
this.politicsOptions.forEach((item, index) => {
|
||||
if (item == this.valiFormData.zzmm) {
|
||||
this.selectedPoliticsOptionIndex = index;
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
methods: {
|
||||
async getAwardsList() {
|
||||
let res = await listXyjxjCanType();
|
||||
if (res.code == 200) {
|
||||
this.awardsList = res.data;
|
||||
this.awardsList.forEach((item, index) => {
|
||||
if (item.typeName == this.valiFormData.typeName) {
|
||||
this.awardsIndex = index;
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
//选择奖项
|
||||
onAwardsChange(e) {
|
||||
this.awardsIndex = e.detail.value;
|
||||
this.valiFormData.typeCode = this.awardsList[this.awardsIndex].typeCode;
|
||||
},
|
||||
//选择政治面貌
|
||||
onPoliticsChange(e) {
|
||||
this.selectedPoliticsOptionIndex = e.detail.value;
|
||||
this.valiFormData.zzmm = this.politicsOptions[this.selectedPoliticsOptionIndex];
|
||||
},
|
||||
async onReSubmit() {
|
||||
const requiredFields = [
|
||||
'zzmm',
|
||||
'classPost',
|
||||
'bankCard',
|
||||
'bankAddr',
|
||||
'goodHis',
|
||||
'mainHis',
|
||||
];
|
||||
if (!validateFormFields(requiredFields, this.valiFormData)) {
|
||||
return;
|
||||
}
|
||||
let boolCard = await alipayVali(this.valiFormData.bankCard);
|
||||
if (boolCard.validated == false) {
|
||||
uni.showToast({
|
||||
title: "请输入正确的银行卡号",
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
if (boolCard.bank != "ABC") {
|
||||
uni.showToast({
|
||||
title: "请输入正确的中国农业银行银行卡号",
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (this.valiFormData.mainHis.length < 100) {
|
||||
uni.showToast({
|
||||
title: "主要事迹字数需要100字以上",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.isSubmitting = true; // 设置为正在提交
|
||||
uni.showLoading({
|
||||
title: "正在提交",
|
||||
success: () => {
|
||||
this.valiFormData.applyId = this.valiFormData.id;
|
||||
reApply(this.valiFormData).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: "重新提交成功"
|
||||
})
|
||||
toBackPage(500, (page) => {
|
||||
page.getList();
|
||||
this.isSubmitting = false;
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.add {
|
||||
background-color: #F5F5F7;
|
||||
padding: 10px;
|
||||
padding-bottom: 80px;
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 22rpx 40rpx;
|
||||
background-color: white;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
.tip {
|
||||
color: red;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom: 20rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
height: 70rpx;
|
||||
padding-left: 30rpx;
|
||||
|
||||
.input-placeholder {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
height: 250rpx;
|
||||
padding: 30rpx;
|
||||
|
||||
&.main-his {
|
||||
height: 500rpx;
|
||||
}
|
||||
|
||||
.input-placeholder {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
}
|
||||
|
||||
picker {
|
||||
border: 1px solid #E1E1E1;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
padding: 0 30rpx;
|
||||
|
||||
text {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
|
||||
.uni-input {
|
||||
display: flex;
|
||||
color: #797979;
|
||||
|
||||
.val {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upload-img {
|
||||
border: 1px solid #E1E1E1;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.tip {
|
||||
margin-top: 15rpx;
|
||||
color: #7a7a7a;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.img-list {
|
||||
border: 1px solid #D8D8D8;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.imgs {
|
||||
padding: 22rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.img {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
height: 170rpx;
|
||||
margin-bottom: 15rpx;
|
||||
margin-right: 15rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.remove {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.btn {
|
||||
border-top: 1px solid #D8D8D8;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
background: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
background-color: #1890FF;
|
||||
color: white;
|
||||
|
||||
&[disabled] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
431
pages/stuGood/scholarship/index.vue
Normal file
431
pages/stuGood/scholarship/index.vue
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user