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) => { ...@@ -80,7 +80,7 @@ const PreView = (props: any) => {
{/* 文件弹窗 */} {/* 文件弹窗 */}
<Modal <Modal
visible={ModalTip} visible={ModalTip}
width={650} width={800}
style={{ textAlign: 'center' }} style={{ textAlign: 'center' }}
footer={null} footer={null}
title={OpenUrl.name} title={OpenUrl.name}
...@@ -92,6 +92,7 @@ const PreView = (props: any) => { ...@@ -92,6 +92,7 @@ const PreView = (props: any) => {
<PDF <PDF
file={OpenUrl ? stringSplit(OpenUrl.url, 'm/cash') : ''} file={OpenUrl ? stringSplit(OpenUrl.url, 'm/cash') : ''}
page={pageNumber} page={pageNumber}
scale={1.25}
onDocumentComplete={onDocumentLoadSuccess} onDocumentComplete={onDocumentLoadSuccess}
/> />
<Pagination <Pagination
......
...@@ -52,8 +52,9 @@ const Contract = (props: any) => { ...@@ -52,8 +52,9 @@ const Contract = (props: any) => {
{ {
title: 'Contract Number', title: 'Contract Number',
render: function (record: any) { render: function (record: any) {
let mom = moment(record.contractValidEndDate).diff(moment(), 'day'); let mom = moment(record.contractValidEndDate).diff(moment(), 'months');
if (mom < 60) { console.log(mom);
if (mom < 2) {
return ( return (
<Tooltip title="Due Soon" placement="right" color={'red'} key={record.id}> <Tooltip title="Due Soon" placement="right" color={'red'} key={record.id}>
<span className={styles.red}>{record.contractNumber}</span> <span className={styles.red}>{record.contractNumber}</span>
......
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { connect } from 'umi'; import { connect, history } from 'umi';
import { Spin, Descriptions } from 'antd'; import { Spin, Descriptions } from 'antd';
import { LeftOutlined } from '@ant-design/icons'; import { LeftOutlined } from '@ant-design/icons';
import moment from 'moment';
import './ContractContent.less'; import './ContractContent.less';
...@@ -18,18 +19,29 @@ const ContractDetail = (props: any) => { ...@@ -18,18 +19,29 @@ const ContractDetail = (props: any) => {
}; };
const [fileList, setFileList] = useState([] as any); // 图片列表 const [fileList, setFileList] = useState([] as any); // 图片列表
const [tipTime, setTipTime] = useState(['previous month', 'two months'] as any); //提示时间
// 带来信息 // 带来信息
useEffect(() => { useEffect(() => {
if (DataSaveDetail == null) { if (DataSaveDetail == null) {
console.log('返回列表'); history.push('/ContractManagement');
} else { } else {
// 请求
let objData = { let objData = {
type: 'tosContractPreview', type: 'tosContractPreview',
fileName: DataSaveDetail.contractFileName, fileName: DataSaveDetail.contractFileName,
extends: DataSaveDetail.communityName, extends: DataSaveDetail.communityName,
}; };
RA(47, objData); 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]); }, [DataSaveDetail]);
...@@ -84,7 +96,19 @@ const ContractDetail = (props: any) => { ...@@ -84,7 +96,19 @@ const ContractDetail = (props: any) => {
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="Date :"> <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>
<Descriptions.Item label="Contacts :"> <Descriptions.Item label="Contacts :">
{DataSaveDetail.communityAccount} {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