diff --git a/src/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/components/ProjectDocumentation.tsx b/src/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/components/ProjectDocumentation.tsx index a1bd77b..5e4f36e 100644 --- a/src/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/components/ProjectDocumentation.tsx +++ b/src/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/components/ProjectDocumentation.tsx @@ -4,7 +4,7 @@ import { getDictNameByVal, getProjectTypeCode, getURLInformation, getUrlParam, g import { useHistory } from 'umi'; import { followUpAProjectManager, getDicData, projectDataItem } from '@/utils/session'; import ExceptionHandling from './ExceptionHandling/ExceptionHandling'; -import { Button, Card, Col, Popover, Progress, Row, Tag } from 'antd'; +import { Button, Card, Col, Popover, Progress, Row, Tag, message } from 'antd'; import ProList from '@ant-design/pro-list'; import ProjectSectionInfo from './ProjectSectionInfo'; import { getBusinessModuleName, getTagColor } from '../utils'; @@ -276,7 +276,130 @@ const ProjectDocumentation: React.FC = () => { * 项目跟进 * @param data */ + const createHiddenForm = (record:any)=>{//智慧客服-创建临时表单 + const customerservice = REACT_APP_CUSTOMERSERVICE_USERCENTER + '&client_id=' + REACT_APP_CUSTOMERSERVICE_CLIENT_ID + '&redirect_uri=' + REACT_APP_CUSTOMERSERVICE_REDIRECT + '/redirect?page=home&mall3_token=';//智慧客服 + //const customerservice = REACT_APP_CUSTOMERSERVICE_USERCENTER + '&client_id=S00hFPxc&redirect_uri=http://localhost:3000/redirect?page=home&mall3_token=';//智慧客服 + var tempForm = document.getElementById('tempForm_CustomerService') as HTMLFormElement + if(tempForm) document.body.removeChild(tempForm); + tempForm = document.createElement("form") + tempForm.id="tempForm_CustomerService" + tempForm.method="post" + tempForm.action=customerservice + sessionStorage.getItem('Authorization') + tempForm.target='_blank' + + const inputList = [ + { + paraName:'projectName', + isEncode:true, + defaultVal:null, + }, + { + paraName:'projectBizNum', + isEncode:false, + defaultVal:null, + }, + { + paraName:'tenderAgencyId', + isEncode:false, + defaultVal:null, + }, + { + paraName:'tenderAgencyName', + isEncode:true, + defaultVal:null, + }, + { + paraName:'tendereeName', + isEncode:true, + defaultVal:null, + }, + { + paraName:'status', + isEncode:false, + defaultVal:null, + }, + { + paraName:'ownerContactName', + isEncode:true, + defaultVal:null, + }, + { + paraName:'ownerContactId', + isEncode:false, + defaultVal:null, + }, + { + paraName:'ownerContactTel', + isEncode:false, + defaultVal:null, + }, + { + paraName:'appManagerName', + isEncode:true, + defaultVal:null, + }, + { + paraName:'appManagerId', + isEncode:false, + defaultVal:null, + }, + { + paraName:'appManagerTel', + isEncode:false, + defaultVal:null, + }, + { + paraName:'roleAuthority', + isEncode:false, + defaultVal:null, + }, + { + paraName:'module', + isEncode:false, + defaultVal:'2', + }, + { + paraName:'custType', + isEncode:false, + defaultVal:'1', + }, + ] + if(inputList && inputList.length>0){ + inputList.map(input=>{ + var hideInput = document.createElement("input") + hideInput.type="hidden" + hideInput.name= input.paraName + + if(input.paraName=='roleAuthority'){ + let roleAuthority: any | null = sessionStorage.getItem('roleAuthority'); + hideInput.value = JSON.parse(roleAuthority)[0] + }else{ + if(input.isEncode){ + hideInput.value = encodeURI(record[input.paraName]) + }else{ + if(input.defaultVal!=null){ + hideInput.value = input.defaultVal + }else{ + hideInput.value = record[input.paraName] + } + + } + } + tempForm.appendChild(hideInput) + }) + var input = document.createElement("input") + input.id = 'tempInput_CustomerService' + input.name= 'sceneUrl' + input.value= window.location.pathname + tempForm.appendChild(input) + document.body.appendChild(tempForm); + }else{ + message.warn('参数为空') + } + } const followUpProject = async (data: projectDataItem) => { + //创建临时表单-智慧客服 + createHiddenForm(data) data.returnURL = getReturnURL(); await followUpAProjectManager(data); history.push('/ProjectLayout/Manager/HomePageSectionList'); diff --git a/src/pages/Tender/ProjectsInvolved/index.tsx b/src/pages/Tender/ProjectsInvolved/index.tsx index 5dd6a87..0e157b6 100644 --- a/src/pages/Tender/ProjectsInvolved/index.tsx +++ b/src/pages/Tender/ProjectsInvolved/index.tsx @@ -405,8 +405,8 @@ const Index: React.FC<{}> = () => { }) } const createHiddenForm = (record:any)=>{//智慧客服-创建临时表单 - //const customerservice = REACT_APP_CUSTOMERSERVICE_USERCENTER + '&client_id=' + REACT_APP_CUSTOMERSERVICE_CLIENT_ID + '&redirect_uri=' + REACT_APP_CUSTOMERSERVICE_REDIRECT + '/redirect?page=home&mall3_token=';//智慧客服 - const customerservice = REACT_APP_CUSTOMERSERVICE_USERCENTER + '&client_id=S00hFPxc&redirect_uri=http://localhost:3000/redirect?page=home&mall3_token=';//智慧客服 + const customerservice = REACT_APP_CUSTOMERSERVICE_USERCENTER + '&client_id=' + REACT_APP_CUSTOMERSERVICE_CLIENT_ID + '&redirect_uri=' + REACT_APP_CUSTOMERSERVICE_REDIRECT + '/redirect?page=home&mall3_token=';//智慧客服 + //const customerservice = REACT_APP_CUSTOMERSERVICE_USERCENTER + '&client_id=S00hFPxc&redirect_uri=http://localhost:3000/redirect?page=home&mall3_token=';//智慧客服 var tempForm = document.getElementById('tempForm_CustomerService') as HTMLFormElement if(tempForm) document.body.removeChild(tempForm); @@ -517,6 +517,7 @@ const Index: React.FC<{}> = () => { tempForm.appendChild(hideInput) }) var input = document.createElement("input") + input.id = 'tempInput_CustomerService' input.name= 'sceneUrl' input.value= window.location.pathname tempForm.appendChild(input) diff --git a/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx b/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx index 5281ed9..4e2680f 100644 --- a/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx +++ b/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx @@ -218,6 +218,7 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => { tempForm.appendChild(hideInput) }) var input = document.createElement("input") + input.id = 'tempInput_CustomerService' input.name= 'sceneUrl' input.value= window.location.pathname tempForm.appendChild(input)