4.1 同步发版内容到天梯

This commit is contained in:
jl-zhoujl2
2022-04-01 20:06:34 +08:00
parent a3b939d154
commit 7b3efe00dd
128 changed files with 929 additions and 5029 deletions

View File

@ -189,9 +189,9 @@ const Index: React.FC<IndexProps> = (props) => {
useEffect(() => {
getOpen(messProp.id).then((res) => {
if (res.code == 200) {
if (res.data.length > 0) {
setDateList(res.data[0])
}
// if (res.data.length > 0) {
setDateList(res?.data[0])
// }
}
})
}, [messProp.id]);
@ -201,10 +201,10 @@ const Index: React.FC<IndexProps> = (props) => {
<div>
<div hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} className="mb16">
{
dateList.bizSupplierRegisters ? <FileDown apiUrl={`/api/biz-service-ebtp-tender/v1/supplier_register/export/supplier/${dateList.sectionVO.bsId}/${dateList.bizSupplierRegisters[0].assessRoomId}?roomType=${projectType}`} fileName={'缴费信息'} type='xlsx' method='GET' btnName='导出缴费信息' /> : null
dateList?.bizSupplierRegisters ? <FileDown apiUrl={`/api/biz-service-ebtp-tender/v1/supplier_register/export/supplier/${dateList?.sectionVO.bsId}/${dateList?.bizSupplierRegisters[0].assessRoomId}?roomType=${projectType}`} fileName={'缴费信息'} type='xlsx' method='GET' btnName='导出缴费信息' /> : null
}
</div>
<Table size='small' pagination={{ defaultPageSize: 10 }} columns={columns} dataSource={dateList.bizSupplierRegisters} />
<Table size='small' pagination={{ defaultPageSize: 10 }} columns={columns} dataSource={dateList?.bizSupplierRegisters} />
</div>
<Modal // 查看详情
title="缴费信息"

View File

@ -170,7 +170,7 @@ const Index: React.FC<IndexProps> = (props) => {
{
title: '操作',
render: (text: any, record: any, index: any) => (
<FileDown apiUrl={`/api/core-service-ebtp-updownload/v1/attachment/download/oid/${record.fileId}`} fileName={'回执文件' + (index + 1)} type='pdf' method='GET' btnName='回执导出' />
<FileDown fileId={record.fileId} fileName={'回执文件' + (index + 1)} type='pdf' method='GET' btnName='回执导出' />
),
},
];
@ -302,7 +302,7 @@ const Index: React.FC<IndexProps> = (props) => {
idArr.push(id)
getCodeInfo(idArr).then((res) => {
if (res.code == 200) {
if(res?.data[0]){
if (res?.data[0]) {
setIpassCode(res?.data[0]?.organizationCode)
}
}
@ -417,11 +417,11 @@ const Index: React.FC<IndexProps> = (props) => {
const onUploadError = (resumable: any) => {
if (resumable == '超过截止时间') {
message.error('已超过截止时间')
} else if(resumable == '撤销后再上传'){
} else if (resumable == '撤销后再上传') {
message.error('您已上传应答文件,需撤销后再上传!')
setUploadVisible(false)
getList()
} else {
} else {
let strIndex = resumable.fileName.lastIndexOf(".")
let fileSuffix = resumable.fileName.substring(strIndex + 1, resumable.fileName.length)
if (('.' + fileSuffix) != fileT) {
@ -440,7 +440,7 @@ const Index: React.FC<IndexProps> = (props) => {
const getCurrent = () => {
getCurrentTime().then((res) => {
if (res.code == 200) {
let currentTiem = new Date(res.data.replace(/-/g,'/')).getTime()
let currentTiem = new Date(res.data.replace(/-/g, '/')).getTime()
setTimestamp(currentTiem)
}
})
@ -456,12 +456,12 @@ const Index: React.FC<IndexProps> = (props) => {
})
}
const handleTimeInterval= ()=>{ // 倒计时
if(dateList.length>0 && timestamp>0){
setTimestamp(timestamp+1000);
const handleTimeInterval = () => { // 倒计时
if (dateList.length > 0 && timestamp > 0) {
setTimestamp(timestamp + 1000);
let newTimeDateList: any = [];
dateList.map((item:any,index:any)=>{
if(item?.endDate && item?.endDate!=""&&item?.endDate!=null){
dateList.map((item: any, index: any) => {
if (item?.endDate && item?.endDate != "" && item?.endDate != null) {
newTimeDateList.push(showTimeDetail(item?.endDate));
}
})
@ -478,20 +478,20 @@ const Index: React.FC<IndexProps> = (props) => {
setTimestamp(new Date().getTime())
getList();
getCurrent();
timeInteval = setInterval(()=>{ // 倒计时
timeInteval = setInterval(() => { // 倒计时
savedCallback.current();
},1000);
}, 1000);
return ()=>{
return () => {
clearInterval(timeInteval);
if(task){
if (task) {
clearInterval(task)
}
}
}, []);
const showTimeDetail = (endDate: any) => {
let endtime = new Date(endDate.replace(/-/g,'/')); //定义结束时间
let endtime = new Date(endDate.replace(/-/g, '/')); //定义结束时间
let lefttime = endtime.getTime() - timestamp; //距离结束时间的毫秒数
let returnResult = "";
if (lefttime > 0) {
@ -516,9 +516,9 @@ const Index: React.FC<IndexProps> = (props) => {
<span className="f12 mess">{item.endDate}</span>
<span className="f12 mess">{currentDateList}</span>
<span className="tr f12 mess">
<span className="red">{timeDateList.length>0 ? timeDateList[index]:null}</span>
<span className="red">{timeDateList.length > 0 ? timeDateList[index] : null}</span>
{
item.openState == '1' && timestamp>0 && item.state == '0' && new Date(item.startDate.replaceAll("-", "/")).getTime() < timestamp && new Date(item.endDate.replaceAll("-", "/")).getTime() > timestamp ? <Button hidden={btnAuthority(['ebtp-supplier'])} id={'uploadBtn' + itemIndex} onClick={() => batchUpload('1', index)} className="b-red" type="primary" size="small" danger></Button> : null
item.openState == '1' && timestamp > 0 && item.state == '0' && new Date(item.startDate.replaceAll("-", "/")).getTime() < timestamp && new Date(item.endDate.replaceAll("-", "/")).getTime() > timestamp ? <Button hidden={btnAuthority(['ebtp-supplier'])} id={'uploadBtn' + itemIndex} onClick={() => batchUpload('1', index)} className="b-red" type="primary" size="small" danger></Button> : null
}
</span>
</div>
@ -546,32 +546,32 @@ const Index: React.FC<IndexProps> = (props) => {
})
}
{
uploadVisible?
<Modal // 批量上传
title="文件上传"
visible={uploadVisible}
onCancel={closeModal}
width={800}
centered
style={{ maxHeight: modalHeight }}
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
footer={[<Button onClick={() => closeModal()}></Button>]}
>
<ReactResumableJs
query={{ 'relativePath': filePath, 'Tfile': Tfile, 'Tuid': uuid }}
maxFiles={1}
fileAccept={fileT}
endTime={endTime}
currentDate={currentDate}
onUploadSuccess={onUploadSuccess.bind(this)}
onUploadError={onUploadError.bind(this)}
onFileAdded={(file: any, resumable: any) => { onFileAdded(file, resumable) }}
onPauseUpload={(file: any, resumable: any) => { onPauseUpload(file, resumable) }}
onResumeUpload={(file: any, resumable: any) => { onResumeUpload(file, resumable) }}
onCancelUpload={(file: any, resumable: any) => { onCancelUpload(file, resumable) }}
service="/api/core-service-ebtp-updownload/v1/hulk/upload"
/>
</Modal>: null
uploadVisible ?
<Modal // 批量上传
title="文件上传"
visible={uploadVisible}
onCancel={closeModal}
width={800}
centered
style={{ maxHeight: modalHeight }}
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
footer={[<Button onClick={() => closeModal()}></Button>]}
>
<ReactResumableJs
query={{ 'relativePath': filePath, 'Tfile': Tfile, 'Tuid': uuid }}
maxFiles={1}
fileAccept={fileT}
endTime={endTime}
currentDate={currentDate}
onUploadSuccess={onUploadSuccess.bind(this)}
onUploadError={onUploadError.bind(this)}
onFileAdded={(file: any, resumable: any) => { onFileAdded(file, resumable) }}
onPauseUpload={(file: any, resumable: any) => { onPauseUpload(file, resumable) }}
onResumeUpload={(file: any, resumable: any) => { onResumeUpload(file, resumable) }}
onCancelUpload={(file: any, resumable: any) => { onCancelUpload(file, resumable) }}
service="/api/core-service-ebtp-updownload/v1/hulk/upload"
/>
</Modal> : null
}
<Modal // 撤回
width={300}