Commit f8fa3286 authored by cellee's avatar cellee

合同详情小修复

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent e815bd8d
......@@ -80,7 +80,7 @@ const PreView = (props: any) => {
{/* 文件弹窗 */}
<Modal
visible={ModalTip}
width={650}
width={800}
style={{ textAlign: 'center' }}
footer={null}
title={OpenUrl.name}
......@@ -92,6 +92,7 @@ const PreView = (props: any) => {
<PDF
file={OpenUrl ? stringSplit(OpenUrl.url, 'm/cash') : ''}
page={pageNumber}
scale={1.25}
onDocumentComplete={onDocumentLoadSuccess}
/>
<Pagination
......
......@@ -52,8 +52,9 @@ const Contract = (props: any) => {
{
title: 'Contract Number',
render: function (record: any) {
let mom = moment(record.contractValidEndDate).diff(moment(), 'day');
if (mom < 60) {
let mom = moment(record.contractValidEndDate).diff(moment(), 'months');
console.log(mom);
if (mom < 2) {
return (
<Tooltip title="Due Soon" placement="right" color={'red'} key={record.id}>
<span className={styles.red}>{record.contractNumber}</span>
......
import React, { useEffect, useState } from 'react';
import { connect } from 'umi';
import { connect, history } from 'umi';
import { Spin, Descriptions } from 'antd';
import { LeftOutlined } from '@ant-design/icons';
import moment from 'moment';
import './ContractContent.less';
......@@ -18,18 +19,29 @@ const ContractDetail = (props: any) => {
};
const [fileList, setFileList] = useState([] as any); // 图片列表
const [tipTime, setTipTime] = useState(['previous month', 'two months'] as any); //提示时间
// 带来信息
useEffect(() => {
if (DataSaveDetail == null) {
console.log('返回列表');
history.push('/ContractManagement');
} else {
// 请求
let objData = {
type: 'tosContractPreview',
fileName: DataSaveDetail.contractFileName,
extends: DataSaveDetail.communityName,
};
RA(47, objData);
// 设置提示时间
let a1 = moment(DataSaveDetail.contractValidEndDate)
.subtract(2, 'month')
.format('YYYY-MM-DD');
let a2 = moment(DataSaveDetail.contractValidEndDate)
.subtract(1, 'month')
.format('YYYY-MM-DD');
setTipTime([a1, a2]);
}
}, [DataSaveDetail]);
......@@ -84,7 +96,19 @@ const ContractDetail = (props: any) => {
</Descriptions.Item>
<Descriptions.Item label="Date :">
{DataSaveDetail.contractValidStartDate} ~ {DataSaveDetail.contractValidEndDate}
<p>
{DataSaveDetail.contractValidStartDate} ~ {DataSaveDetail.contractValidEndDate}
</p>
<p style={{ marginBottom: 0, color: '#999' }}>
The system will send e-mail notification in the{' '}
<span style={{ color: 'red' }}>{tipTime[0]}</span> and{' '}
<span style={{ color: 'red' }}>{tipTime[1]}</span> that the contract is about to
expire !
</p>
{/* <p style={{ marginBottom: 0 }}>
<span style={{ color: 'red' }}>*</span> If the time has passed, it will not be
sent
</p> */}
</Descriptions.Item>
<Descriptions.Item label="Contacts :">
{DataSaveDetail.communityAccount}
......
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