学生资助-手写签名改为从学生资料获取
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user