学生资助-手写签名改为从学生资料获取

This commit is contained in:
2026-03-12 12:13:15 +08:00
parent 5550482a51
commit 867d98bba1
6 changed files with 111 additions and 67 deletions

View File

@@ -588,6 +588,14 @@
// 处理用户个人信息
if (userProfileRes.code === 200 && userProfileRes.data) {
// 可以获取用户相关信息
// 获取用户签名
const signature = userProfileRes.data.signature
if (signature) {
// 设置表单签名字段
this.formData.xsqm = signature
// 构造完整的图片URL
this.signImg = this.baseUrl + signature
}
}
// 处理家庭成员信息
if (familyRes.code === 200 && familyRes.data && familyRes.data.length > 0) {

View File

@@ -297,6 +297,7 @@
import { getOwnSign } from '@/api/workStudy/post';
import { getOwnKnrd, getOwnExtraInfo, getOwnInfo as getOwnStuInfo } from '@/api/finance/special';
import uploadFile from "@/plugins/upload.js"
import { getUserProfile } from '@/api/system/user'
import config from '@/config'
export default {
data() {
@@ -418,17 +419,17 @@
this.loading = true;
try {
// 并行请求所有基础信息
const [signRes, knrdRes, stuInfoRes, extraInfoRes] = await Promise.all([
getOwnSign(),
const [userProfileRes, knrdRes, stuInfoRes, extraInfoRes] = await Promise.all([
getUserProfile(),
getOwnKnrd(),
getOwnStuInfo(),
getOwnExtraInfo()
]);
// 处理签名信息
if (signRes && signRes.data) {
this.formData.applySign = signRes.data;
this.signImg = this.baseUrl + signRes.data;
if (userProfileRes && userProfileRes.code === 200 && userProfileRes.data && userProfileRes.data.signature) {
this.formData.applySign = userProfileRes.data.signature;
this.signImg = this.baseUrl + userProfileRes.data.signature;
}
// 处理困难认定信息

View File

@@ -316,6 +316,7 @@
<script>
import { add, update, reApply, getOwnSign, getOwnFamily, getStudentInfo, getExtraInfo } from '@/api/finance/knzzZsg';
import uploadFile from "@/plugins/upload.js"
import { getUserProfile } from '@/api/system/user'
import config from '@/config'
export default {
@@ -427,11 +428,11 @@ export default {
// 并行调用多个API接口
Promise.all([
getOwnSign(),
getUserProfile(),
getOwnFamily(),
getStudentInfo(),
getExtraInfo()
]).then(([signRes, familyRes, studentRes, extraRes]) => {
]).then(([userProfileRes, familyRes, studentRes, extraRes]) => {
uni.hideLoading();
// 处理学生基本信息
@@ -483,8 +484,9 @@ export default {
}
// 处理签名信息
if (signRes.code === 200 && signRes.data) {
// 这里可以处理签名信息,根据实际需求
if (userProfileRes.code === 200 && userProfileRes.data && userProfileRes.data.signature) {
this.formData.applySign = userProfileRes.data.signature;
this.signImg = this.baseUrl + userProfileRes.data.signature;
}
}).catch(err => {
uni.hideLoading();

View File

@@ -220,12 +220,12 @@
<view class="approval-section">
<view class="section-title">院系审核意见</view>
<view class="approval-content">
<text v-if="formData.deptCmt" class="approval-text">{{ formData.deptCmt }}</text>
<text v-if="formData.xwCmt" class="approval-text">{{ formData.xwCmt }}</text>
<text v-else class="no-content">暂无审核意见</text>
</view>
<view class="approval-info">
<text v-if="formData.xwName">审核人{{ formData.xwName }}</text>
<text v-if="formData.deptDate">审核时间{{ formData.deptDate }}</text>
<text v-if="formData.xwDate">审核时间{{ formData.xwDate }}</text>
</view>
</view>
@@ -260,6 +260,7 @@
import { getDetail, doApply, doEdit, doReApply, getOwnInfo, getOwnExtraInfo, getYearByTag } from '@/api/finance/knzzZzq';
import { getOwnSign } from '@/api/workStudy/post';
import uploadFile from "@/plugins/upload.js";
import { getUserProfile } from '@/api/system/user';
import config from "@/config.js";
export default {
name: "KnzzZzqApply",
@@ -389,9 +390,9 @@ import config from "@/config.js";
await this.fetchYearData();
// 并行请求所有基础信息
const [infoRes, signRes] = await Promise.all([
const [infoRes, userProfileRes] = await Promise.all([
getOwnInfo(),
getOwnSign()
getUserProfile()
]);
const infoData = infoRes.data || {};
@@ -416,9 +417,9 @@ import config from "@/config.js";
}
// 处理签名信息
if (signRes && signRes.data) {
this.formData.applySign = signRes.data;
this.signImg = this.baseUrl + signRes.data;
if (userProfileRes && userProfileRes.code === 200 && userProfileRes.data && userProfileRes.data.signature) {
this.formData.applySign = userProfileRes.data.signature;
this.signImg = this.baseUrl + userProfileRes.data.signature;
}
// 获取个人扩展信息

View File

@@ -450,6 +450,7 @@
import { addApply, updateApply, getApply, infoCheck, getStuByXh, getxh, extraInfo, stuInfoView, getOwnFamily, getCurrentYear, queryByStuNo, getKnrdYear } from '@/api/finance/poverty'
import uploadFile from "@/plugins/upload.js"
import { queryAffixs, getAffixItems, deleteAffix } from '@/api/affix'
import { getUserProfile } from '@/api/system/user'
import config from '@/config'
export default {
data() {
@@ -626,6 +627,9 @@ import config from '@/config'
this.formData.xb = res.data.gender
this.formData.phone = res.data.phone
// 获取用户签名
this.getUserSignature()
// 获取扩展信息
this.getOwnInfo()
// 获取家庭成员信息
@@ -639,6 +643,22 @@ import config from '@/config'
this.loading = false
})
},
// 获取用户签名
getUserSignature() {
getUserProfile().then(res => {
if (res.code === 200 && res.data) {
const signature = res.data.signature
if (signature) {
// 设置表单签名字段
this.formData.sqrqm = signature
// 构造完整的图片URL
this.signImg = this.baseUrl + signature
}
}
}).catch(err => {
console.error('获取用户签名失败:', err)
})
},
// 获取申请详情
getApplyDetail() {
if (!this.applyId) return

View File

@@ -262,6 +262,7 @@
<script>
import { addApply, updateApply, getApply, getOwnFamily, getOwnKnrd, getOwnExtraInfo, getOwnInfo, reApply } from '@/api/finance/special';
import uploadFile from "@/plugins/upload.js"
import { getUserProfile } from '@/api/system/user'
import config from '@/config'
export default {
@@ -456,6 +457,17 @@ export default {
this.formData.familyAddr = extraData.xjtdz || '';
this.formData.postCode = extraData.jtyzbm || '';
}
// 获取用户签名
const userProfileRes = await getUserProfile();
if (userProfileRes.code === 200 && userProfileRes.data) {
const signature = userProfileRes.data.signature;
if (signature) {
// 设置表单签名字段
this.formData.applySign = signature;
// 构造完整的图片URL
this.signImg = this.baseUrl + signature;
}
}
} catch (error) {
console.error('获取用户信息失败:', error);
}
@@ -772,7 +784,7 @@ export default {
this.goBack();
}, 1500);
} else {
uni.showToast({ title: res.message || '提交失败', icon: 'none' });
uni.showToast({ title: res.msg || '提交失败', icon: 'none' });
}
} catch (error) {
console.error('提交申请失败:', error);