Commit 0480d672 authored by alwayOnlie's avatar alwayOnlie

优化代码

parent 4af6b5ec
......@@ -57,6 +57,7 @@ const Details = (props: any) => {
const [payPlanList, setpayPlanList] = useState<any>([])
const [contractText, setcontractText] = useState<any>([])
const [signatureLogId, setsignatureLogId] = useState<any>('') // 签署地址id
const [state, setstate] = useState<any>(false);
const [targetOffset, setTargetOffset] = useState<number | undefined>(undefined);
const [contractAbstract, setcontractAbstract] = useState('');
......@@ -144,7 +145,8 @@ const Details = (props: any) => {
if (info.file.response) {
const { code } = info.file.response;
console.log(code);
message.info(info.file.response.message);
message.info('上传成功');
setstate(true);
}
;
if (info.file.status !== 'uploading') {
......@@ -193,10 +195,6 @@ const Details = (props: any) => {
/* 审核 */
const onFinish = (values: any) => {
values.contractId = contractId;
let msg = message.loading({
content: '正在操作',
duration: 0,
});
console.log('Success:', values);
let fn: any;
switch (type) {
......@@ -215,32 +213,42 @@ const Details = (props: any) => {
default:
break;
}
fn(values).then(res => {
console.log(res);
if (res.code === 1000) {
setIsModalVisible(!Visible)
setTimeout(() => {
switch (type) {
case 'submitExamine':
history.push('/memberCenter/contract/coordination/pageToBeSubmitExamine')
break;
case 'levelexamine':
history.push('/memberCenter/contract/coordination/pageToBeExamineOne')
break;
case 'pageToBeExamineTwo':
history.push('/memberCenter/contract/coordination/pageToBeExamineTwo')
break;
case 'Sign':
history.push('/memberCenter/contract/coordination/Sign')
break;
default:
break;
}
}, 2000);
}
}).finally(() => {
msg();
});
if (type === 'Sign' && !state) {
console.log(type, state)
message.warning('请先上传合同');
return;
} else {
let msg = message.loading({
content: '正在操作',
duration: 0,
});
fn(values).then(res => {
console.log(res);
if (res.code === 1000) {
setIsModalVisible(!Visible)
setTimeout(() => {
switch (type) {
case 'submitExamine':
history.push('/memberCenter/contract/coordination/pageToBeSubmitExamine')
break;
case 'levelexamine':
history.push('/memberCenter/contract/coordination/pageToBeExamineOne')
break;
case 'pageToBeExamineTwo':
history.push('/memberCenter/contract/coordination/pageToBeExamineTwo')
break;
case 'Sign':
history.push('/memberCenter/contract/coordination/Sign')
break;
default:
break;
}
}, 2000);
}
}).finally(() => {
msg();
});
}
};
const onFinishFailed = (errorInfo: any) => {
......
......@@ -59,10 +59,6 @@ const Add: React.FC<{}> = (props: any) => {
basics: basicsVO.data,
detailList: detailList,
}
console.log('====================================');
console.log(data);
console.log('====================================');
return;
PublicApi.postContractApplyAmountSave(data).then(res => {
console.log(res);
if (res.code === 1000) {
......
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