From d0ac51952f2971446b7663565ec965755e28f498 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= <792998983@qq.com>
Date: Tue, 8 Nov 2022 10:10:59 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=9B=E5=AE=A2=E6=B5=81?=
=?UTF-8?q?=E7=A8=8B=E4=B8=AD=E7=9A=84=E5=AE=9E=E5=90=8D=E3=80=81=E8=B4=A2?=
=?UTF-8?q?=E5=8A=A1=E8=AE=A4=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/managements/components/layouts/index.jsx | 3 +-
.../task/components/itemListPaper/index.jsx | 17 ++++++++--
src/military/task/index.scss | 4 +++
src/military/task/myTask/index.jsx | 4 ++-
src/military/task/myTask/joinTask.jsx | 17 ++++++++--
src/military/task/taskDetail/index.jsx | 16 ++++++++-
src/military/task/taskList/index.jsx | 34 +++++++++++++------
src/modules/tpm/NewHeader.js | 18 +++++++++-
8 files changed, 95 insertions(+), 18 deletions(-)
diff --git a/src/managements/components/layouts/index.jsx b/src/managements/components/layouts/index.jsx
index 0f1bab220..32923efdf 100644
--- a/src/managements/components/layouts/index.jsx
+++ b/src/managements/components/layouts/index.jsx
@@ -187,8 +187,9 @@ export default (props) => {
{head(keyPath)}
+ {/* 如果不是react的新后端,那就用iframe打开 */}
{acitve && acitve.urlType && acitve.urlType !== 'self' ?
-
+
: children
}
diff --git a/src/military/task/components/itemListPaper/index.jsx b/src/military/task/components/itemListPaper/index.jsx
index 1009771c1..9073ddb83 100644
--- a/src/military/task/components/itemListPaper/index.jsx
+++ b/src/military/task/components/itemListPaper/index.jsx
@@ -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 (
@@ -171,7 +184,7 @@ export default Form.create()((props) => {
{ setComplainVisible(true); setCheckedItem(item) }}>申诉}
{item.status === 2 && detailStatus === 6 && (current_user.login === item.user.login) && (!item.sign) && (item.canApplicantSign || item.canApplicantSignByPlatform) &&
- { setAgreeVisible(true); setCheckedItem(item) }}>签订协议}
+ {certificationCheck(item); }}>签订协议}
{item.status === 2 && detailStatus === 7 && (current_user.login === item.user.login) && (item.task && item.task.agreementSigning === 1) && (!item.isPay) &&
{ confirmReceiptModal(item.id) }}>确认收款}
diff --git a/src/military/task/index.scss b/src/military/task/index.scss
index 20300a583..ffff5a3b0 100644
--- a/src/military/task/index.scss
+++ b/src/military/task/index.scss
@@ -253,4 +253,8 @@ span.list-gray {
border-radius: 5px;
}
}
+}
+
+.ant-modal-confirm-confirm{
+ top:150px;
}
\ No newline at end of file
diff --git a/src/military/task/myTask/index.jsx b/src/military/task/myTask/index.jsx
index f3ce3cce3..451ba6045 100644
--- a/src/military/task/myTask/index.jsx
+++ b/src/military/task/myTask/index.jsx
@@ -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 }) => {
diff --git a/src/military/task/myTask/joinTask.jsx b/src/military/task/myTask/joinTask.jsx
index 60cbb505d..30ddf87ff 100644
--- a/src/military/task/myTask/joinTask.jsx
+++ b/src/military/task/myTask/joinTask.jsx
@@ -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 type="primary" size="small" onClick={() => { certificationCheck(record) }}>签订协议
}
{
@@ -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({
diff --git a/src/military/task/taskDetail/index.jsx b/src/military/task/taskDetail/index.jsx
index b265db264..3b94315cc 100644
--- a/src/military/task/taskDetail/index.jsx
+++ b/src/military/task/taskDetail/index.jsx
@@ -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
{/* 为创客大赛,暂时disable应征投稿 */}
-
+
}
}, [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}
/>
diff --git a/src/military/task/taskList/index.jsx b/src/military/task/taskList/index.jsx
index 86dd19461..b493d93b1 100644
--- a/src/military/task/taskList/index.jsx
+++ b/src/military/task/taskList/index.jsx
@@ -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 (
@@ -277,7 +291,7 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
-
+ {/* 点击此处 */}
您暂无权限,仅平台指定企业允许需求提报
- 若想需求提报,请在账号管理处
完善企业认证信息,或
点击此处提交需求申请信息,后续管理员将与您联系。
+ 若想需求提报,请在账号管理处
完善企业认证信息,或
点击此处提交需求申请信息,后续管理员将与您联系。
diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js
index 37077faef..8c01efcf9 100644
--- a/src/modules/tpm/NewHeader.js
+++ b/src/modules/tpm/NewHeader.js
@@ -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(
- {item.name}
+
+ { item.name!=="需求申请"?{item.name}:{this.needAdd(item.url)}}>{item.name}}
+
)
})
}