9.7 同步master版本,解决冲突
This commit is contained in:
@ -2,12 +2,13 @@ import React, { useState } from 'react';
|
||||
import { queryingPagingData } from '@/utils/PageUtils';
|
||||
import { getDictNameByVal, getProjectTypeCode, getURLInformation, getUrlParam, getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnumOther } from '@/utils/CommonUtils';
|
||||
import { useHistory } from 'umi';
|
||||
import { followUpAProjectManager, getDicData, projectDataItem } from '@/utils/session';
|
||||
import { followUpAProjectManager, getDicData, projectDataItem, getSessionUserData } 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';
|
||||
import {submitHiddenForm, createHiddenForm} from '@/utils/CustomerService' //智慧客服
|
||||
//标的类型
|
||||
const procurementTypeEntrust = 'procurement_type=entrust';
|
||||
//采购方式
|
||||
@ -276,7 +277,100 @@ const ProjectDocumentation: React.FC = () => {
|
||||
* 项目跟进
|
||||
* @param data
|
||||
*/
|
||||
const saveTmpForm = (record:any)=>{//智慧客服-创建临时表单
|
||||
let roleAuthority: any | null = sessionStorage.getItem('roleAuthority');
|
||||
let data = getSessionUserData();
|
||||
const inputList = [
|
||||
{
|
||||
label:null,
|
||||
paraName:'origin',
|
||||
isEncode:false,
|
||||
paraVal:'eBid',
|
||||
},
|
||||
{
|
||||
label:null,
|
||||
paraName:'organizationId',
|
||||
isEncode:false,
|
||||
paraVal: data.organizationId,
|
||||
},
|
||||
{
|
||||
label:'项目名称',
|
||||
paraName:'projectName',
|
||||
isEncode:true,
|
||||
paraVal:record.projectName,
|
||||
},
|
||||
{
|
||||
label:'项目编号 ',
|
||||
paraName:'ebpProjectNumber',
|
||||
isEncode:true,
|
||||
paraVal:record.ebpProjectNumber,
|
||||
},
|
||||
{
|
||||
label:'项目流水号',
|
||||
paraName:'projectBizNum',
|
||||
isEncode:false,
|
||||
paraVal:record.projectBizNum,
|
||||
},
|
||||
{
|
||||
label:null,
|
||||
paraName:'tenderAgencyId',
|
||||
isEncode:false,
|
||||
paraVal:'EMPTY',
|
||||
},
|
||||
{
|
||||
label:null,
|
||||
paraName:'tenderAgencyName',
|
||||
isEncode:true,
|
||||
paraVal:'招投标客服',
|
||||
},
|
||||
{
|
||||
label:'项目状态',
|
||||
paraName:'status',
|
||||
isEncode:false,
|
||||
paraVal:record.status==1?'编辑中':record.status==2?'进行中':record.status==3?'已结束':record.status==9?'废止':'无效状态',
|
||||
},
|
||||
{
|
||||
label:'采购单位',
|
||||
paraName:'tendereeName',
|
||||
isEncode:true,
|
||||
paraVal:record.tendereeName,
|
||||
},
|
||||
{
|
||||
label:'实施单位',
|
||||
paraName:'providerName',
|
||||
isEncode:true,
|
||||
paraVal:record.tenderAgencyName,
|
||||
},
|
||||
{
|
||||
label:'实施人员',
|
||||
paraName:'ownerContactName',
|
||||
isEncode:true,
|
||||
paraVal:record.appManagerName+'-'+record.appManagerId+'-'+record.appManagerTel
|
||||
},
|
||||
{
|
||||
label:null,
|
||||
paraName:'roleAuthority',
|
||||
isEncode:false,
|
||||
paraVal:JSON.parse(roleAuthority)[0],
|
||||
},
|
||||
{
|
||||
label:null,
|
||||
paraName:'module',
|
||||
isEncode:false,
|
||||
paraVal:'2',
|
||||
},
|
||||
{
|
||||
label:null,
|
||||
paraName:'custType',
|
||||
isEncode:false,
|
||||
paraVal:'1',
|
||||
},
|
||||
]
|
||||
createHiddenForm(inputList, window.location.pathname)
|
||||
}
|
||||
const followUpProject = async (data: projectDataItem) => {
|
||||
//创建临时表单-智慧客服
|
||||
saveTmpForm(data)
|
||||
data.returnURL = getReturnURL();
|
||||
await followUpAProjectManager(data);
|
||||
history.push('/ProjectLayout/Manager/HomePageSectionList');
|
||||
@ -295,6 +389,8 @@ const ProjectDocumentation: React.FC = () => {
|
||||
* @param data
|
||||
*/
|
||||
const projectDocumentation = async (data: projectDataItem) => {
|
||||
//创建临时表单-智慧客服
|
||||
saveTmpForm(data)
|
||||
data.returnURL = getReturnURL();
|
||||
await followUpAProjectManager(data);
|
||||
history.push('/Project/ProjectManage/ProjectManager/ProjectInformationManagement');
|
||||
|
@ -14,6 +14,7 @@ import PackageDivided from '@/pages/Project/ProjectManage/PackageDivided';
|
||||
import { getId, getProjectIsUpdate, submitProject } from './service';
|
||||
import { history } from 'umi';
|
||||
import { getProMethod, followUpAProjectManager, getSessionProjectData } from '@/utils/session';
|
||||
import { CustomerServiceTwoTone } from '@ant-design/icons';
|
||||
const { TabPane } = Tabs;
|
||||
|
||||
let tab1 = '项目信息',
|
||||
@ -156,13 +157,35 @@ const Index: React.FC = () => {
|
||||
setSubmitLoading(false);
|
||||
});
|
||||
}
|
||||
|
||||
const initChatUI = () => { //智慧客服
|
||||
var tempForm = document.getElementById('tempForm_CustomerService') as HTMLFormElement
|
||||
if(tempForm){
|
||||
var hideInput = document.getElementById('tempInput_CustomerService') as HTMLInputElement
|
||||
if(hideInput){
|
||||
hideInput.value= window.location.pathname
|
||||
}else{
|
||||
hideInput = document.createElement("input")
|
||||
hideInput.id = 'tempInput_CustomerService'
|
||||
hideInput.type="hidden"
|
||||
hideInput.name= 'sceneUrl'
|
||||
hideInput.value= window.location.pathname
|
||||
tempForm.appendChild(hideInput)
|
||||
}
|
||||
tempForm.submit();
|
||||
}else{
|
||||
message.warn('请先选择建档项目')
|
||||
}
|
||||
}
|
||||
return (
|
||||
<Spin spinning={submitLoading}>
|
||||
<Card title={
|
||||
<span>
|
||||
<span style={{ verticalAlign: 'middle' }}>项目建档</span>
|
||||
<Button onClick={() => window.history.go(-1)} style={{ float: 'right' }}>返回</Button>
|
||||
<Button key="customerservice" style={{ float: 'right' }} onClick={() =>{
|
||||
initChatUI() //智慧客服
|
||||
}} icon={<CustomerServiceTwoTone />}>我要咨询
|
||||
</Button>,
|
||||
</span>
|
||||
} style={{ borderRadius: 6 }} headStyle={{ padding: "0px 24px" }} bodyStyle={{ padding: "1px 0px" }}
|
||||
>
|
||||
|
@ -9,11 +9,13 @@
|
||||
|
||||
import { getURLInformation, getUrlParam, getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnum } from '@/utils/CommonUtils';
|
||||
import { queryingPagingData } from '@/utils/PageUtils';
|
||||
import { followUpAProjectManager, getDicData, setPurchaseCanOperate } from '@/utils/session';
|
||||
import { followUpAProjectManager, getDicData, setPurchaseCanOperate, getSessionUserData } from '@/utils/session';
|
||||
import ProTable, { ProColumns } from '@ant-design/pro-table';
|
||||
import { Button, Card, PageHeader } from 'antd';
|
||||
import React, { useState } from 'react';
|
||||
import { useHistory } from 'umi';
|
||||
import kefu from '@/assets/img/kefu.png' //智慧客服
|
||||
import {submitHiddenForm, createHiddenForm} from '@/utils/CustomerService' //智慧客服
|
||||
const PurchasingManagerEnquiries: React.FC = () => {
|
||||
//获取字典
|
||||
const getDict: any = getDicData();
|
||||
@ -46,6 +48,13 @@ const PurchasingManagerEnquiries: React.FC = () => {
|
||||
dataIndex: 'projectName',
|
||||
initialValue: projectName
|
||||
},
|
||||
{
|
||||
title: '我要咨询',
|
||||
dataIndex: 'consult',
|
||||
render: (text: any, record: any) => (
|
||||
<span onClick={()=>{saveTmpForm(record); initChatUI()}}><img style={{width:20,height:20, cursor:'pointer'}} src={kefu} alt="" /></span>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '项目编号',
|
||||
dataIndex: 'ebpProjectNumber',
|
||||
@ -97,7 +106,100 @@ const PurchasingManagerEnquiries: React.FC = () => {
|
||||
)
|
||||
},
|
||||
];
|
||||
|
||||
const saveTmpForm = (record:any)=>{//智慧客服-创建临时表单
|
||||
let roleAuthority: any | null = sessionStorage.getItem('roleAuthority');
|
||||
let data = getSessionUserData();
|
||||
const inputList = [
|
||||
{
|
||||
label:null,
|
||||
paraName:'origin',
|
||||
isEncode:false,
|
||||
paraVal:'eBid',
|
||||
},
|
||||
{
|
||||
label:null,
|
||||
paraName:'organizationId',
|
||||
isEncode:false,
|
||||
paraVal: data.organizationId,
|
||||
},
|
||||
{
|
||||
label:'项目名称',
|
||||
paraName:'projectName',
|
||||
isEncode:true,
|
||||
paraVal:record.projectName,
|
||||
},
|
||||
{
|
||||
label:'项目编号',
|
||||
paraName:'ebpProjectNumber',
|
||||
isEncode:false,
|
||||
paraVal:record.ebpProjectNumber,
|
||||
},
|
||||
{
|
||||
label:'项目流水号',
|
||||
paraName:'projectBizNum',
|
||||
isEncode:false,
|
||||
paraVal:record.projectBizNum,
|
||||
},
|
||||
{
|
||||
label:null,
|
||||
paraName:'tenderAgencyId',
|
||||
isEncode:false,
|
||||
paraVal:'EMPTY',
|
||||
},
|
||||
{
|
||||
label:null,
|
||||
paraName:'tenderAgencyName',
|
||||
isEncode:true,
|
||||
paraVal:'招投标客服',
|
||||
},
|
||||
{
|
||||
label:'项目状态',
|
||||
paraName:'status',
|
||||
isEncode:false,
|
||||
paraVal:record.status==1?'编辑中':record.status==2?'进行中':record.status==3?'已结束':record.status==9?'废止':'无效状态',
|
||||
},
|
||||
{
|
||||
label:'采购单位',
|
||||
paraName:'tendereeName',
|
||||
isEncode:true,
|
||||
paraVal:record.tendereeName,
|
||||
},
|
||||
{
|
||||
label:'实施单位',
|
||||
paraName:'providerName',
|
||||
isEncode:true,
|
||||
paraVal:record.tenderAgencyName,
|
||||
},
|
||||
{
|
||||
label:'实施人员',
|
||||
paraName:'ownerContactName',
|
||||
isEncode:true,
|
||||
paraVal:record.appManagerName+'-'+record.appManagerId+'-'+record.appManagerTel
|
||||
},
|
||||
{
|
||||
label:null,
|
||||
paraName:'roleAuthority',
|
||||
isEncode:false,
|
||||
paraVal:JSON.parse(roleAuthority)[0],
|
||||
},
|
||||
{
|
||||
label:null,
|
||||
paraName:'module',
|
||||
isEncode:false,
|
||||
paraVal:'2',
|
||||
},
|
||||
{
|
||||
label:null,
|
||||
paraName:'custType',
|
||||
isEncode:false,
|
||||
paraVal:'1',
|
||||
},
|
||||
]
|
||||
createHiddenForm(inputList, window.location.pathname)
|
||||
}
|
||||
const initChatUI = ()=>{ //打开客服界面
|
||||
submitHiddenForm()
|
||||
}
|
||||
/**
|
||||
* 获取返回路径
|
||||
* @returns
|
||||
@ -112,6 +214,7 @@ const PurchasingManagerEnquiries: React.FC = () => {
|
||||
* @param data
|
||||
*/
|
||||
const followUpProject = async (data: any) => {
|
||||
saveTmpForm(data)
|
||||
data.returnURL = getReturnURL()
|
||||
await followUpAProjectManager(data);
|
||||
setPurchaseCanOperate();
|
||||
|
Reference in New Issue
Block a user