forked from Gitlink/forgeplus-react
Merge pull request '增加创客流程中的实名、财务认证' (#472) from tongChong/forgeplus-react:pre_dev_military into pre_dev_military
This commit is contained in:
commit
1aaae843f2
|
@ -187,8 +187,9 @@ export default (props) => {
|
|||
</div>
|
||||
<div className="managements">
|
||||
<div className="head-title">{head(keyPath)}</div>
|
||||
{/* 如果不是react的新后端,那就用iframe打开 */}
|
||||
{acitve && acitve.urlType && acitve.urlType !== 'self' ?
|
||||
<iframe id="iframe" className="iframe-item" src={`${setting[acitve.urlType]}${acitve.location && acitve.location.startsWith('/administration') ? acitve.location.replace(/\/administration/, "") : acitve.location}?${acitve.params || 'layout=none'}`} onLoad={iframeLoad}></iframe>
|
||||
<iframe id="iframe" className="iframe-item" src={`${setting[acitve.urlType]}${acitve.location && acitve.location.startsWith('/administration') ? acitve.location.replace(/\/administration/, "") : acitve.location}${acitve.location.indexOf('?')>-1?'&layout=none':'?layout=none'}`} onLoad={iframeLoad}></iframe>
|
||||
: children
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -24,7 +24,7 @@ for (const item of paperCheckStatusArr) {
|
|||
}
|
||||
|
||||
export default Form.create()((props) => {
|
||||
const { list, curPage, total, changePage, loading, applyStatusAllNameArr, reloadList, showNotification, current_user, form, detailStatus, expertReview } = props;
|
||||
const { list, curPage, total, changePage, loading, applyStatusAllNameArr, reloadList, showNotification, current_user, form, detailStatus, expertReview ,mygetHelmetapi} = props;
|
||||
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||
const [page, setPage] = useState(1);
|
||||
const pageSize = props.pageSize || 10;
|
||||
|
@ -142,6 +142,19 @@ export default Form.create()((props) => {
|
|||
[]
|
||||
);
|
||||
|
||||
function certificationCheck(item) {
|
||||
if (current_user.bankCertification) {
|
||||
setAgreeVisible(true);
|
||||
setCheckedItem(item);
|
||||
} else {
|
||||
Modal.confirm({
|
||||
content: "签订协议前请先完成财务认证,是否前往认证?",
|
||||
onOk() {
|
||||
window.location.href=`${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
@ -171,7 +184,7 @@ export default Form.create()((props) => {
|
|||
<a className="base_smallBtn blue_line_btn fl" onClick={() => { setComplainVisible(true); setCheckedItem(item) }}>申诉</a>}
|
||||
|
||||
{item.status === 2 && detailStatus === 6 && (current_user.login === item.user.login) && (!item.sign) && (item.canApplicantSign || item.canApplicantSignByPlatform) &&
|
||||
<a className="base_smallBtn blue_line_btn fl" onClick={() => { setAgreeVisible(true); setCheckedItem(item) }}>签订协议</a>}
|
||||
<a className="base_smallBtn blue_line_btn fl" onClick={() => {certificationCheck(item); }}>签订协议</a>}
|
||||
|
||||
{item.status === 2 && detailStatus === 7 && (current_user.login === item.user.login) && (item.task && item.task.agreementSigning === 1) && (!item.isPay) &&
|
||||
<a className="base_smallBtn blue_line_btn fl" onClick={() => { confirmReceiptModal(item.id) }}>确认收款</a>}
|
||||
|
|
|
@ -253,4 +253,8 @@ span.list-gray {
|
|||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ant-modal-confirm-confirm{
|
||||
top:150px;
|
||||
}
|
|
@ -19,7 +19,7 @@ for (const item of taskStatusAllArr) {
|
|||
statusArr[item.dicItemCode] = item.dicItemName;
|
||||
}
|
||||
|
||||
export default ({ location, history, current_user, showNotification }) => {
|
||||
export default ({ location, history, current_user, showNotification,mygetHelmetapi }) => {
|
||||
let defaultValue = decodeURI(location.search.split("=")[1] || "");
|
||||
|
||||
const [identity, setIdentity] = useState('1');
|
||||
|
@ -209,6 +209,8 @@ export default ({ location, history, current_user, showNotification }) => {
|
|||
<JoinTask
|
||||
taskCategoryValueArr={taskCategoryValueArr}
|
||||
showNotification={showNotification}
|
||||
mygetHelmetapi={mygetHelmetapi}
|
||||
current_user={current_user}
|
||||
/>
|
||||
</TabPane>
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ for (const item of paperCheckStatusArr) {
|
|||
paperCheckStatus[item.dicItemCode] = item.dicItemName;
|
||||
}
|
||||
|
||||
export default ({ taskCategoryValueArr, showNotification }) => {
|
||||
export default ({ taskCategoryValueArr, showNotification,mygetHelmetapi,current_user }) => {
|
||||
|
||||
const [paperStatusString, setPaperStatusString] = useState('0,1,2,3,4');
|
||||
const [taskStatusString, setTaskStatusString] = useState('3,4,5,6,7,8');
|
||||
|
@ -138,7 +138,7 @@ export default ({ taskCategoryValueArr, showNotification }) => {
|
|||
}
|
||||
|
||||
{record.status === 2 && record.task.status === 6 && (!record.sign) && (record.canApplicantSign || record.canApplicantSignByPlatform) &&
|
||||
< Button type="primary" size="small" onClick={() => { setAgreeVisible(true); setCheckedItem(record) }}>签订协议</Button>
|
||||
< Button type="primary" size="small" onClick={() => { certificationCheck(record) }}>签订协议</Button>
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -151,6 +151,19 @@ export default ({ taskCategoryValueArr, showNotification }) => {
|
|||
];
|
||||
}, [taskCategoryValueArr, publishModeArr, statusArr]);
|
||||
|
||||
function certificationCheck(item) {
|
||||
if (current_user.bankCertification) {
|
||||
setAgreeVisible(true);
|
||||
setCheckedItem(item);
|
||||
} else {
|
||||
Modal.confirm({
|
||||
content: "签订协议前请先完成财务认证,是否前往认证?",
|
||||
onOk() {
|
||||
window.location.href=`${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function confirmReceiptModal(paperId) {
|
||||
Modal.confirm({
|
||||
|
|
|
@ -320,6 +320,19 @@ export default Form.create()(
|
|||
setReload(Math.random());
|
||||
}, []);
|
||||
|
||||
function certificationCheck() {
|
||||
if (current_user.authentication || current_user.enterpriseCertification) {
|
||||
setApplyModal(true);
|
||||
} else {
|
||||
Modal.confirm({
|
||||
content: "请先完成实名认证再提交需求申请,是否前往认证?",
|
||||
onOk() {
|
||||
window.location.href=`${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const signContent = useCallback(() => {
|
||||
if (signAgreement && isPaper) {
|
||||
let checkStatustext;
|
||||
|
@ -364,7 +377,7 @@ export default Form.create()(
|
|||
} else if (detailData.user && (current_user.login !== detailData.user.login)) {
|
||||
return <div className="edu-back-white padding30 mt20 text-center">
|
||||
{/* 为创客大赛,暂时disable应征投稿 */}
|
||||
<Button className="mr20" type={"primary"} onClick={() => { setApplyModal(true) }} disabled={detailData.enterpriseName == "taohuayuan"}>我要应征投稿</Button>
|
||||
<Button className="mr20" type={"primary"} onClick={certificationCheck} disabled={detailData.enterpriseName == "taohuayuan"}>我要应征投稿</Button>
|
||||
</div>
|
||||
}
|
||||
}, [signAgreement, isPaper, current_user, detailData, dataList]);
|
||||
|
@ -566,6 +579,7 @@ export default Form.create()(
|
|||
detailStatus={detailData.status}
|
||||
agreementSigning={detailData.agreementSigning}
|
||||
expertReview={detailData.expertReview}
|
||||
mygetHelmetapi={mygetHelmetapi}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ const Search = Input.Search;
|
|||
|
||||
|
||||
export default ({ history, current_user, showLoginDialog, location, mygetHelmetapi }) => {
|
||||
|
||||
console.log(current_user);
|
||||
let initType = getUrlToken('type', location.search) || '';
|
||||
let taskParams = sessionStorage.getItem("taskParams") ? JSON.parse(sessionStorage.getItem("taskParams")) : {};
|
||||
|
||||
|
@ -49,7 +49,7 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
'viewport',
|
||||
'width=1200',
|
||||
);
|
||||
document.querySelector('#root').className = "page -layout-v -fit widthunit";
|
||||
document.querySelector('#root').className = "page -layout-v -fit widthunit";
|
||||
document.querySelector('body').className = "";
|
||||
}
|
||||
}
|
||||
|
@ -132,19 +132,19 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
let surplus;
|
||||
switch (item.status) {
|
||||
case 3:
|
||||
surplus = item.collectingDays * 24 * 3600 - (new Date() - new Date((item.publishedAt || item.createdAt).replace(/-/g,'/'))) / 1000;
|
||||
surplus = item.collectingDays * 24 * 3600 - (new Date() - new Date((item.publishedAt || item.createdAt).replace(/-/g, '/'))) / 1000;
|
||||
break;
|
||||
case 4:
|
||||
surplus = item.choosingDays * 24 * 3600 - (new Date() - new Date(item.collectingCompleteAt.replace(/-/g,'/'))) / 1000;
|
||||
surplus = item.choosingDays * 24 * 3600 - (new Date() - new Date(item.collectingCompleteAt.replace(/-/g, '/'))) / 1000;
|
||||
break;
|
||||
case 5:
|
||||
surplus = item.makePublicDays * 24 * 3600 - (new Date() - new Date(item.makePublicAt.replace(/-/g,'/'))) / 1000;
|
||||
surplus = item.makePublicDays * 24 * 3600 - (new Date() - new Date(item.makePublicAt.replace(/-/g, '/'))) / 1000;
|
||||
break;
|
||||
case 6:
|
||||
surplus = item.signingDays * 24 * 3600 - (new Date() - new Date(item.publicityCompleteAt.replace(/-/g,'/'))) / 1000;
|
||||
surplus = item.signingDays * 24 * 3600 - (new Date() - new Date(item.publicityCompleteAt.replace(/-/g, '/'))) / 1000;
|
||||
break;
|
||||
case 7:
|
||||
surplus = item.payingDays * 24 * 3600 - (new Date() - new Date(item.signingCompleteAt.replace(/-/g,'/'))) / 1000;
|
||||
surplus = item.payingDays * 24 * 3600 - (new Date() - new Date(item.signingCompleteAt.replace(/-/g, '/'))) / 1000;
|
||||
break;
|
||||
default:
|
||||
surplus = 0;
|
||||
|
@ -188,13 +188,27 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
if (res) {
|
||||
if (res.message === 'success') {
|
||||
history.push("/task/taskAdd");
|
||||
} else { //if (res.message === '未进行实体认证')
|
||||
} else {
|
||||
//if (res.message === '未进行实体认证')
|
||||
setVisible(true)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function certificationCheck() {
|
||||
if (current_user.authentication || current_user.enterpriseCertification) {
|
||||
history.push('/needs/new')
|
||||
} else {
|
||||
Modal.confirm({
|
||||
content: "请先完成实名认证再提交需求申请,是否前往认证?",
|
||||
onOk() {
|
||||
window.location.href=`${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="centerbox" style={{ marginTop: '20px' }}>
|
||||
|
||||
|
@ -277,7 +291,7 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
{/* <Link to={'/needs/new'}>点击此处</Link> */}
|
||||
<Modal
|
||||
className='go_profiles'
|
||||
visible={visible}
|
||||
|
@ -291,7 +305,7 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
<div className='profiles-tit'>您暂无权限,仅<span >平台指定企业</span>允许需求提报</div>
|
||||
<img className='polify' src={polify} />
|
||||
<div className='profiles-content'>
|
||||
若想需求提报,请在账号管理处<a href={`${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`}>完善企业认证信息</a>,或<Link to={'/needs/new'}>点击此处</Link>提交需求申请信息,后续管理员将与您联系。
|
||||
若想需求提报,请在账号管理处<a href={`${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`}>完善企业认证信息</a>,或<a onClick={certificationCheck}>点击此处</a>提交需求申请信息,后续管理员将与您联系。
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
|
|
|
@ -614,6 +614,20 @@ class NewHeader extends Component {
|
|||
goshowqqgtounp: bool
|
||||
})
|
||||
}
|
||||
needAdd=(url)=> {
|
||||
let {current_user,mygetHelmetapi,history}=this.props;
|
||||
if (current_user.authentication || current_user.enterpriseCertification) {
|
||||
history.push('/needs/new')
|
||||
} else {
|
||||
Modal.confirm({
|
||||
content: "请先完成实名认证再提交需求申请,是否前往认证?",
|
||||
onOk() {
|
||||
window.location.href=`${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { resetUserInfo , showNotification, match, current_user } = this.props;
|
||||
|
||||
|
@ -768,7 +782,9 @@ class NewHeader extends Component {
|
|||
{
|
||||
settings && settings.add && settings.add.map((item,key)=>{
|
||||
return(
|
||||
<li key={key}><a href={item.url}>{item.name}</a></li>
|
||||
<li key={key}>
|
||||
{ item.name!=="需求申请"?<a href={item.url}>{item.name}</a>:<a onClick={()=>{this.needAdd(item.url)}}>{item.name}</a>}
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue