学生资助-手写签名改为从学生资料获取
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -297,7 +297,8 @@
|
||||
import { getOwnSign } from '@/api/workStudy/post';
|
||||
import { getOwnKnrd, getOwnExtraInfo, getOwnInfo as getOwnStuInfo } from '@/api/finance/special';
|
||||
import uploadFile from "@/plugins/upload.js"
|
||||
import config from '@/config'
|
||||
import { getUserProfile } from '@/api/system/user'
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
// 处理困难认定信息
|
||||
@@ -498,56 +499,56 @@
|
||||
}
|
||||
|
||||
// 处理额外信息
|
||||
if (extraInfoRes && extraInfoRes.data) {
|
||||
const extraInfo = extraInfoRes.data;
|
||||
console.log('额外信息:', extraInfo);
|
||||
this.formData.familyNum = extraInfo.familyNum || this.formData.familyNum;
|
||||
this.formData.monthMoney = extraInfo.monthMoney || this.formData.monthMoney;
|
||||
this.formData.perMoney = extraInfo.perMoney || this.formData.perMoney;
|
||||
this.formData.moneySrc = extraInfo.moneySrc || this.formData.moneySrc;
|
||||
// 处理困难类型
|
||||
if (extraInfo.hardType) {
|
||||
this.formData.hardType = extraInfo.hardType;
|
||||
} else if (extraInfo.xsqmyj) {
|
||||
// 处理xsqmyj字段,映射到困难类型
|
||||
switch (extraInfo.xsqmyj) {
|
||||
case '1':
|
||||
this.formData.hardType = '特别困难';
|
||||
break;
|
||||
case '2':
|
||||
this.formData.hardType = '比较困难';
|
||||
break;
|
||||
case '3':
|
||||
this.formData.hardType = '一般困难';
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 尝试从额外信息中获取民族和政治面貌
|
||||
if (extraInfo.mz) {
|
||||
this.formData.mz = extraInfo.mz;
|
||||
}
|
||||
if (extraInfo.zzmm) {
|
||||
this.formData.zzmm = extraInfo.zzmm;
|
||||
}
|
||||
// 处理家庭住址和邮政编码
|
||||
if (extraInfo.xjtdz) {
|
||||
this.formData.homeAddr = extraInfo.xjtdz;
|
||||
} else if (extraInfo.hkszd) {
|
||||
this.formData.homeAddr = extraInfo.hkszd;
|
||||
} else if (extraInfo.hksz1 && extraInfo.hksz2 && extraInfo.hksz3) {
|
||||
this.formData.homeAddr = extraInfo.hksz1 + extraInfo.hksz2 + extraInfo.hksz3;
|
||||
}
|
||||
if (extraInfo.jtyzbm) {
|
||||
this.formData.postCode = extraInfo.jtyzbm;
|
||||
} else if (extraInfo.yzbm) {
|
||||
this.formData.postCode = extraInfo.yzbm;
|
||||
}
|
||||
// 处理证件照
|
||||
if (extraInfo.whitePhoto) {
|
||||
this.formData.pic = extraInfo.whitePhoto;
|
||||
console.log('设置证件照:', this.formData.pic);
|
||||
}
|
||||
if (extraInfoRes && extraInfoRes.data) {
|
||||
const extraInfo = extraInfoRes.data;
|
||||
console.log('额外信息:', extraInfo);
|
||||
this.formData.familyNum = extraInfo.familyNum || this.formData.familyNum;
|
||||
this.formData.monthMoney = extraInfo.monthMoney || this.formData.monthMoney;
|
||||
this.formData.perMoney = extraInfo.perMoney || this.formData.perMoney;
|
||||
this.formData.moneySrc = extraInfo.moneySrc || this.formData.moneySrc;
|
||||
// 处理困难类型
|
||||
if (extraInfo.hardType) {
|
||||
this.formData.hardType = extraInfo.hardType;
|
||||
} else if (extraInfo.xsqmyj) {
|
||||
// 处理xsqmyj字段,映射到困难类型
|
||||
switch (extraInfo.xsqmyj) {
|
||||
case '1':
|
||||
this.formData.hardType = '特别困难';
|
||||
break;
|
||||
case '2':
|
||||
this.formData.hardType = '比较困难';
|
||||
break;
|
||||
case '3':
|
||||
this.formData.hardType = '一般困难';
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 尝试从额外信息中获取民族和政治面貌
|
||||
if (extraInfo.mz) {
|
||||
this.formData.mz = extraInfo.mz;
|
||||
}
|
||||
if (extraInfo.zzmm) {
|
||||
this.formData.zzmm = extraInfo.zzmm;
|
||||
}
|
||||
// 处理家庭住址和邮政编码
|
||||
if (extraInfo.xjtdz) {
|
||||
this.formData.homeAddr = extraInfo.xjtdz;
|
||||
} else if (extraInfo.hkszd) {
|
||||
this.formData.homeAddr = extraInfo.hkszd;
|
||||
} else if (extraInfo.hksz1 && extraInfo.hksz2 && extraInfo.hksz3) {
|
||||
this.formData.homeAddr = extraInfo.hksz1 + extraInfo.hksz2 + extraInfo.hksz3;
|
||||
}
|
||||
if (extraInfo.jtyzbm) {
|
||||
this.formData.postCode = extraInfo.jtyzbm;
|
||||
} else if (extraInfo.yzbm) {
|
||||
this.formData.postCode = extraInfo.yzbm;
|
||||
}
|
||||
// 处理证件照
|
||||
if (extraInfo.whitePhoto) {
|
||||
this.formData.pic = extraInfo.whitePhoto;
|
||||
console.log('设置证件照:', this.formData.pic);
|
||||
}
|
||||
}
|
||||
|
||||
// 如果有申请ID,获取申请详情
|
||||
if (this.id) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
// 获取个人扩展信息
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user