This commit is contained in:
黄心宇 2023-07-24 12:43:58 +08:00
parent e8739893e4
commit c566020495
5 changed files with 58 additions and 32 deletions

View File

@ -18,7 +18,7 @@ const checkStatusArr = [];
for (const item of paperCheckStatusArr) {
checkStatusArr[item.dicItemCode] = item.dicItemName;
}
export default Form.create()(({ form, history }) => {
export default Form.create()(({ form, history, showNotification }) => {
const { getFieldDecorator, setFieldsValue, getFieldsValue } = form;
@ -81,7 +81,11 @@ export default Form.create()(({ form, history }) => {
signatureFormSignTaskId: item.checkedAgreementSignTaskId
}
getSignUrl(params).then(data => {
history.push({ pathname: '/managements/iframe', state: { url: data.data } })
if (data.data) {
history.push({ pathname: '/managements/iframe', state: { url: data.data } })
} else {
showNotification('签署链接获取失败,请联系管理员');
}
}).finally(() => {
setSignLoading(false);
})
@ -110,10 +114,7 @@ export default Form.create()(({ form, history }) => {
},
{
title: '胜出者姓名',
dataIndex: 'user',
render: (text, record) => {
return record.nickname || record.login
}
dataIndex: 'winnerName',
},
{
title: '协议',
@ -159,14 +160,6 @@ export default Form.create()(({ form, history }) => {
</Select>,
signStatus.unsigned
)}
{helper(
"任务编号",
"number",
[{ max: 20, message: '长度不能超过20个字符' }],
<Input
placeholder="请输入任务编号"
/>
)}
{helper(
"任务名称",
@ -176,15 +169,6 @@ export default Form.create()(({ form, history }) => {
placeholder="请输入任务名称"
/>
)}
{helper(
"胜出者姓名",
"number",
[{ max: 20, message: '长度不能超过20个字符' }],
<Input
placeholder="请输入胜出者姓名"
/>
)}
<Button className="mr10" type="primary" onClick={onSearch}>搜索</Button>
<Button className="mr10" type="" onClick={clearSearch}>清除</Button>
</div>

View File

@ -82,7 +82,11 @@ export default Form.create()(({ current_user, form, showNotification, match, his
signatureFormSignTaskId: item.signatureFormSignTaskId
}
getSignUrl(params).then(data => {
history.push({ pathname: '/managements/iframe', state: { url: data.data } });
if (data.data) {
history.push({ pathname: '/managements/iframe', state: { url: data.data } });
} else {
showNotification('签署链接获取失败,请联系管理员');
}
}).finally(() => {
setSignLoading(false);
})
@ -107,10 +111,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
},
{
title: '发布主体',
dataIndex: 'user',
render: (text, record) => {
return record.nickname || record.login
}
dataIndex: 'publisher',
},
{
title: '发布时间',

View File

@ -813,4 +813,13 @@ export function getUserSignUrl(params) {
method: 'get',
params,
});
}
// 查询当前任务文件上传情况
export function getUploadStatus(params) {
return fetch({
url: `/api/taskOnlineSign/firstDraftUploadStatus`,
method: 'get',
params,
});
}

View File

@ -101,12 +101,12 @@ export default Form.create()(props => {
<div className="task-popup-content">
{/* paperAuditing */}
{checkedItem.paperAuditing && <p className=" mb10 color-orange task_tip">审核意见{checkedItem.paperAuditing.message}</p>}
<ExportWord
{/* <ExportWord
className="icon icon-attachment font-13 color-blue"
title="协议模板.doc"
fileName="协议模板"
wordId="wordExpert"
/>
/> */}
<Form.Item className="upload-form" label="协议上传" required={true}>
<Upload

View File

@ -7,7 +7,7 @@ import Loading from "src/Loading";
import { editorConfig } from 'military/components/config';
import AgreementModal from '../agreementModal';
import ComplainModal from '../complainModal';
import { reportPaper, thumbUpPaper, commentAdd, confirmReceipt } from '../../api';
import { reportPaper, thumbUpPaper, commentAdd, confirmReceipt, getUploadStatus } from '../../api';
import { paperCheckStatusArr } from '../../static';
import { httpUrl } from '../../fetch';
import winpng from '../../image/winner.png';
@ -39,12 +39,20 @@ export default Form.create()((props) => {
const [loadingChild, setLoadingChild] = useState(false);
//
const [uploadStatus, setUploadStatus] = useState(false);
useEffect(() => {
changePage(page);
}, [page]);
useEffect(() => {
if (detailStatus === 6) {
getUploadFileStatus()
}
},[list])
function downFile(item) {
if(item.uniqueFileName){
window.open(httpUrl+'/busiAttachments/downloadAttachment/'+item.uniqueFileName);
@ -119,6 +127,29 @@ export default Form.create()((props) => {
window.location.href = `${chromesettingArray.main_web_site_url}/accounts/${login}`;
}
//
function getUploadFileStatus() {
let numberList = []
list.forEach(e => {
if (e.status === 2) {
numberList.push(e.number)
}
})
if (numberList.length > 0) {
getUploadStatus({ paperNumbers: numberList.join(',') }).then(res => {
let status = {}
if (res.data) {
res.data.forEach(e => {
status[e.paperNumber] = e
})
}
console.log(status)
setUploadStatus(status)
})
}
}
function confirmReceiptModal(paperId) {
Modal.confirm({
@ -173,7 +204,8 @@ export default Form.create()((props) => {
{winReview && i ==1 && <span className='winReview'><img src={win2}/>第二名</span>}
{winReview && i ==2 && <span className='winReview'><img src={win3}/>第三名</span>}
{
item.status === 2 && detailStatus === 6 && taskLimit &&
// 使
item.status === 2 && detailStatus === 6 && taskLimit && uploadStatus[item.number] && !( uploadStatus[item.number].agreementUpload && uploadStatus[item.number].signatureFormUpload ) &&
<a className="right-button" onClick={() => {certificationCheck(item); }}>签订协议</a>
}
{