去掉客服代码
This commit is contained in:
@ -1,15 +1,16 @@
|
||||
import React, { useState, useRef } from 'react';
|
||||
import React, { useState, useRef, useEffect } from 'react';
|
||||
import { Button, Tabs, Form, Input, Modal, Space, Checkbox, message, PageHeader, Popconfirm, Progress, Tag, Spin } from 'antd';
|
||||
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||
import { getSection, exitProject, getProject, getOther, supplierRegister, exitProjectPayCheck } from './service';
|
||||
import { getSupplierUser } from '@/utils/SupplierList/service'
|
||||
import { getProMethod } from '@/utils/session';
|
||||
import { getProMethod, getSessionUserData, getRA } from '@/utils/session';
|
||||
import '@/assets/ld_style.less';
|
||||
import { history } from 'umi';
|
||||
import { followUpAProjectSupplier, getDicData } from '@/utils/session';
|
||||
import { getDictName, getProjectTypeCode, getURLInformation, getUrlParam, getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnum, proTableValueEnumOther } from '@/utils/CommonUtils';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
import ProList from '@ant-design/pro-list';
|
||||
import { MessageOutlined } from '@ant-design/icons';
|
||||
|
||||
const { TabPane } = Tabs;
|
||||
const { TextArea } = Input;
|
||||
@ -36,6 +37,8 @@ const Index: React.FC<{}> = () => {
|
||||
const [sectionsVal, setSectionsVal] = useState<any>([]); // 选中数组id
|
||||
const [organId, setOrganId] = useState<any>(); // id
|
||||
const [projectId, setProjectId] = useState<any>(); // id
|
||||
|
||||
|
||||
const [quitForm] = Form.useForm();
|
||||
const MethodDict = getProMethod(); //获取采购方式
|
||||
const modalHeight = (innerHeight * 96) / 100;
|
||||
@ -120,6 +123,13 @@ const Index: React.FC<{}> = () => {
|
||||
dataIndex: 'projectName',
|
||||
initialValue: projectName ? projectName : void 0,
|
||||
},
|
||||
{
|
||||
title: '我要咨询',
|
||||
dataIndex: 'consult',
|
||||
render: (text: any, record: any) => (
|
||||
<Button type="text" danger size='large' icon={<MessageOutlined />} onClick={()=>{initChatUI(record)}}/>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: proTypeCode.indexOf("procurement_mode_4") !== -1 ? '招募人' : '采购人',
|
||||
dataIndex: 'tendereeOrgName',
|
||||
@ -358,7 +368,8 @@ const Index: React.FC<{}> = () => {
|
||||
title: date,
|
||||
onOk() {
|
||||
if (checkedList.length > 0) {
|
||||
quitForm.getFieldValue().checkbox = checkedList
|
||||
//quitForm.getFieldValue().checkbox = checkedList 报错——林杰注释
|
||||
quitForm.setFieldsValue({checkbox: checkedList})
|
||||
}
|
||||
quitForm.submit()
|
||||
setCheckAll(false)
|
||||
@ -381,7 +392,8 @@ const Index: React.FC<{}> = () => {
|
||||
showConfirm(res.data)
|
||||
} else {
|
||||
if (checkedList.length > 0) {
|
||||
quitForm.getFieldValue().checkbox = checkedList
|
||||
//quitForm.getFieldValue().checkbox = checkedList 报错——林杰注释
|
||||
quitForm.setFieldsValue({checkbox: checkedList})
|
||||
}
|
||||
quitForm.submit()
|
||||
setCheckAll(false)
|
||||
@ -391,7 +403,121 @@ const Index: React.FC<{}> = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const initChatUI = (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=';//智慧客服
|
||||
var tempForm = document.createElement("form")
|
||||
tempForm.id="tempForm1"
|
||||
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:'10',
|
||||
},
|
||||
{
|
||||
paraName:'custType',
|
||||
isEncode:false,
|
||||
defaultVal:'2',
|
||||
},
|
||||
]
|
||||
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)
|
||||
})
|
||||
document.body.appendChild(tempForm);
|
||||
tempForm.submit();
|
||||
document.body.removeChild(tempForm);
|
||||
}else{
|
||||
message.warn('参数为空')
|
||||
}
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<PageHeader
|
||||
|
Reference in New Issue
Block a user