Commit 2d14cf14 authored by XieZhiXiong's avatar XieZhiXiong

chore: 添加 catch

parent a92e4fc4
......@@ -76,12 +76,14 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
if (res.code === 1000) {
setQuotaInfo(res.data);
setQuotaValues({
applyQuota: res.data.apply.applyQuota,
billDay: res.data.apply.billDay,
repayPeriod: res.data.apply.repayPeriod,
fileList: res.data.apply.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [],
applyQuota: res.data?.apply?.applyQuota,
billDay: res.data?.apply?.billDay,
repayPeriod: res.data?.apply?.repayPeriod,
fileList: res.data?.apply?.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [],
});
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setInfoloading(false);
});
......
......@@ -87,6 +87,8 @@ const UploadVoucherModal: React.FC<UploadVoucherModalProps> = (props: UploadVouc
if (res.code === 1000) {
setBankAccount(res.data);
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setLoading(false);
});
......
......@@ -47,6 +47,8 @@ const QuotaMenageDetail: React.FC = () => {
if (res.code === 1000) {
setCreditInfo(res.data);
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setInfoLoading(false);
});
......@@ -118,6 +120,8 @@ const QuotaMenageDetail: React.FC = () => {
if (res.code === 1000) {
setCreditOverdueList(res.data.data);
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setCreditOverdueListLoading(false);
});
......
......@@ -105,10 +105,10 @@ const DetailInfo: React.FC<DetailInfoProps> = (props) => {
// 审批信息不存在 或者 审批信息里边 审批额度不存在
// 说明没有 修改过 审批信息,手动赋值 授信申请里的数据
if ((!verify || !lodash.isNumber(verify.quota)) && res.data.member.innerStatus === CREDIT_INNER_STATUS_UNCOMMITTED) {
quotaValuesData.quota = apply.applyQuota;
quotaValuesData.billDay = apply.billDay;
quotaValuesData.repayPeriod = apply.repayPeriod;
if ((!verify || !lodash.isNumber(verify.quota)) && res.data?.member?.innerStatus === CREDIT_INNER_STATUS_UNCOMMITTED) {
quotaValuesData.quota = apply?.applyQuota;
quotaValuesData.billDay = apply?.billDay;
quotaValuesData.repayPeriod = apply?.repayPeriod;
}
// 如果有审批信息则直接赋值 审批信息
......@@ -121,13 +121,13 @@ const DetailInfo: React.FC<DetailInfoProps> = (props) => {
setQuotaInfo({
...res.data,
quotaInfo: {
originalQuota: res.data.apply.originalQuota,
applyQuota: res.data.apply.applyQuota,
billDay: res.data.apply.billDay,
repayPeriod: res.data.apply.repayPeriod,
applyTime: res.data.apply.applyTime,
fileList: res.data.apply.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [],
applyType: res.data.apply.applyType,
originalQuota: res.data?.apply?.originalQuota,
applyQuota: res.data?.apply?.applyQuota,
billDay: res.data?.apply?.billDay,
repayPeriod: res.data?.apply?.repayPeriod,
applyTime: res.data?.apply?.applyTime,
fileList: res.data?.apply?.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [],
applyType: res.data?.apply?.applyType,
},
verify: lodash.isNumber(quotaValuesData.quota) ? {
quota: quotaValuesData.quota,
......@@ -138,6 +138,8 @@ const DetailInfo: React.FC<DetailInfoProps> = (props) => {
} : null,
});
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setInfoloading(false);
});
......
......@@ -45,6 +45,8 @@ const QuotaMenageDetail: React.FC = () => {
if (res.code === 1000) {
setCreditInfo(res.data);
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setInfoLoading(false);
});
......@@ -116,6 +118,8 @@ const QuotaMenageDetail: React.FC = () => {
if (res.code === 1000) {
setCreditOverdueList(res.data.data);
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setCreditOverdueListLoading(false);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment