部署供货商客服入口

This commit is contained in:
unknown
2022-07-11 16:01:49 +08:00
parent e91466b3af
commit 503e8ed03f
7 changed files with 185 additions and 14 deletions

View File

@ -194,6 +194,24 @@ const Promenu: React.FC<{}> = () => {
const handlePopoverClose = () => {
setAnchorEl(null);
};
const initChatUI = () => { //智慧客服
var pathname = window.location.pathname
var consultType = pathname.substring(pathname.lastIndexOf('/')+1)
var tempForm = document.getElementById('tempForm_CustomerService') as HTMLFormElement
if(tempForm){
var hideInput = document.getElementById('tempInput_CustomerService') as HTMLInputElement
if(hideInput){
hideInput.value= consultType
}else{
hideInput = document.createElement("input")
hideInput.id = 'tempInput_CustomerService'
hideInput.type="hidden"
hideInput.name= 'consultType'
tempForm.appendChild(hideInput)
}
tempForm.submit();
}
}
return (
<div key='promenuDiv1' style={{ borderRadius: "6px", overflow: "hidden" }}>
<div key='promenuDiv2' className="site-page-header-ghost-wrapper" style={{ background: '#ffffff' }}>
@ -212,6 +230,9 @@ const Promenu: React.FC<{}> = () => {
history.push("/ProjectLayout/Archive/projectArchive")
setButtonValue(stepButtonClick(data?.[data?.length - 1]))
}}></Button> : null,
<Button key="customerservice" onClick={() =>{
initChatUI() //智慧客服
}}></Button>,
((randerRole == 'ebtp-agency-project-manager' || randerRole == 'ebtp-purchase' || randerRole == 'ebtp-supervision') && MethodDict != "procurement_mode_7")
? <Button key="manageyiyi" onClick={() => history.push("/Project/ProjectManage/ProjectManager/ObjectionComplaint")}></Button> : null,
(randerRole == 'ebtp-supplier' && MethodDict != "procurement_mode_7")