From 566ebae68bc4d74b6abb65938c42ea811fb1ef3a Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Tue, 27 Sep 2022 15:31:15 +0800 Subject: [PATCH] =?UTF-8?q?9.27=20=E6=A0=87=E7=9A=84=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=94=AF=E6=8C=81=E5=A4=9A=E4=B8=AA=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Project/EntrustAssign/manager/index.tsx | 4 +- .../Project/EntrustAssign/operator/index.tsx | 4 +- src/pages/Project/EntrustWithdraw/index.tsx | 4 +- .../Examination/components/ProjectManage.tsx | 12 +- .../components/ProjectDocumentation.tsx | 120 ++-- .../components/ProcurementMethod7.tsx | 4 +- .../components/PurchasingManagerEnquiries.tsx | 512 +++++++++--------- .../Supervision/components/FavoritesList.tsx | 4 +- .../Supervision/components/ProjectManage.tsx | 4 +- src/pages/Tender/ProjectsInvolved/index.tsx | 132 ++--- .../components/InvitationLetter.tsx | 170 +++--- .../LookingForBusinessOpportunitiesList.tsx | 122 ++--- .../service.ts | 71 ++- src/utils/CommonUtils.ts | 9 + 14 files changed, 589 insertions(+), 583 deletions(-) diff --git a/src/pages/Project/EntrustAssign/manager/index.tsx b/src/pages/Project/EntrustAssign/manager/index.tsx index 81900bd..f3bcbc5 100644 --- a/src/pages/Project/EntrustAssign/manager/index.tsx +++ b/src/pages/Project/EntrustAssign/manager/index.tsx @@ -1,7 +1,7 @@ import React, { useState, useRef, useEffect } from 'react'; import { message, Modal, Col, Input, Form, Row, PageHeader, TreeSelect, Button, Spin, Upload } from 'antd'; import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table'; -import { proTableValueEnum, returnDictVal } from '@/utils/CommonUtils'; +import { multipleTypeTransform, proTableValueEnum, returnDictVal } from '@/utils/CommonUtils'; import { getPage, agreeEntrust, queryEntrust, recallEntrust, refuseEntrust, aginstEntrust, assignEntrust, queryTree } from './service'; import './styles.less'; import { getDicData, getSessionUserData } from '@/utils/session'; @@ -186,7 +186,7 @@ const entrust: React.FC<{}> = () => { { title: '方案编号', dataIndex: 'projectNumber', width: '10%', search: false }, { title: '接收时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime', search: false }, { title: '采购方式', dataIndex: 'procurementMode', width: '10%', valueEnum: proTableValueEnum(dictData['procurement_mode=entrust']) }, - { title: '标的类型', dataIndex: 'procurementType', width: '10%', hideInTable: typeVisible, search: false, valueEnum: proTableValueEnum(dictData['procurement_type=entrust']) }, + { title: '标的类型', dataIndex: 'procurementType', width: '10%', hideInTable: typeVisible, search: false, render: (_, record) => multipleTypeTransform(record.procurementType, proTableValueEnum(dictData['procurement_type=entrust'])) }, { title: '状态', dataIndex: 'status', width: '10%', valueEnum: { diff --git a/src/pages/Project/EntrustAssign/operator/index.tsx b/src/pages/Project/EntrustAssign/operator/index.tsx index 583162e..f605145 100644 --- a/src/pages/Project/EntrustAssign/operator/index.tsx +++ b/src/pages/Project/EntrustAssign/operator/index.tsx @@ -1,7 +1,7 @@ import React, { useState, useRef, useEffect } from 'react'; import { message, Modal, Col, Input, Form, Row, PageHeader, Button, Spin, Upload } from 'antd'; import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table'; -import { proTableValueEnum, returnDictVal } from '@/utils/CommonUtils'; +import { multipleTypeTransform, proTableValueEnum, returnDictVal } from '@/utils/CommonUtils'; import { getPage, agreeEntrust, queryEntrust, recallEntrust, refuseEntrust, aginstEntrust } from './service'; import './styles.less'; import { getDicData, getSessionUserData } from '@/utils/session'; @@ -155,7 +155,7 @@ const entrust: React.FC<{}> = () => { { title: '方案编号', dataIndex: 'projectNumber', width: '6%', search: false }, { title: '接收时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime', search: false }, { title: '采购方式', dataIndex: 'procurementMode', width: '6%', valueEnum: proTableValueEnum(dictData['procurement_mode=entrust']) }, - { title: '标的类型', dataIndex: 'procurementType', width: '5%', hideInTable: typeVisible, search: false, valueEnum: proTableValueEnum(dictData['procurement_type=entrust']) }, + { title: '标的类型', dataIndex: 'procurementType', width: '5%', hideInTable: typeVisible, search: false, render: (_, record) => multipleTypeTransform(record.procurementType, proTableValueEnum(dictData['procurement_type=entrust'])) }, { title: '状态', dataIndex: 'status', width: '4%', valueEnum: { diff --git a/src/pages/Project/EntrustWithdraw/index.tsx b/src/pages/Project/EntrustWithdraw/index.tsx index 55d85c4..3ec8af0 100644 --- a/src/pages/Project/EntrustWithdraw/index.tsx +++ b/src/pages/Project/EntrustWithdraw/index.tsx @@ -1,7 +1,7 @@ import React, { useState, useRef, useEffect } from 'react'; import { Modal, Col, Input, Form, Row, PageHeader, Button, Spin, Upload } from 'antd'; import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table'; -import { proTableValueEnum, returnDictVal } from '@/utils/CommonUtils'; +import { multipleTypeTransform, proTableValueEnum, returnDictVal } from '@/utils/CommonUtils'; import { getPage, queryEntrust } from './service'; import './styles.less'; import { getDicData, getSessionRoleData, getSessionUserData } from '@/utils/session'; @@ -47,7 +47,7 @@ const entrust: React.FC<{}> = () => { { title: '接收时间', dataIndex: 'receiveTime', width: '10%', valueType: 'dateTime', search: false }, { title: '撤回时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime', search: false }, { title: '采购方式', dataIndex: 'procurementMode', width: '6%', valueEnum: proTableValueEnum(dictData['procurement_mode=entrust']) }, - { title: '标的类型', dataIndex: 'procurementType', width: '5%', search: false, valueEnum: proTableValueEnum(dictData['procurement_type=entrust']) }, + { title: '标的类型', dataIndex: 'procurementType', width: '5%', search: false, render: (_, record) => multipleTypeTransform(record.procurementType, proTableValueEnum(dictData['procurement_type=entrust'])) }, { title: '操作', width: '4%', valueType: 'option', diff --git a/src/pages/Project/ProjectManage/Examination/components/ProjectManage.tsx b/src/pages/Project/ProjectManage/Examination/components/ProjectManage.tsx index 8c9c0a5..c736fbd 100644 --- a/src/pages/Project/ProjectManage/Examination/components/ProjectManage.tsx +++ b/src/pages/Project/ProjectManage/Examination/components/ProjectManage.tsx @@ -1,4 +1,4 @@ -import { getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnum } from '@/utils/CommonUtils'; +import { getUrlRelativePath, isEmpty, isNotEmpty, multipleTypeTransform, proTableValueEnum } from '@/utils/CommonUtils'; import { followUpAProjectManager, getDicData, setPurchaseCanOperate } from '@/utils/session'; import ProTable, { ProColumns } from '@ant-design/pro-table'; import { Button, Spin } from 'antd'; @@ -45,15 +45,15 @@ const ProjectManage: React.FC = (props) => { { title: '采购方式', dataIndex: 'bidMethodDict', - + width: '7.5%', valueEnum: proTableValueEnum(dictData[procurementModeEntrust]), - initialValue: isNotEmpty(bidMethodDict) ? bidMethodDict : null , + initialValue: isNotEmpty(bidMethodDict) ? bidMethodDict : null, }, { title: '项目名称', dataIndex: 'projectName', - initialValue: isNotEmpty(projectName) ? projectName : null , + initialValue: isNotEmpty(projectName) ? projectName : null, }, { title: '项目编号', @@ -78,7 +78,7 @@ const ProjectManage: React.FC = (props) => { dataIndex: 'procurementType', width: '5%', search: false, - valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), + render: (_, record) => multipleTypeTransform(record.procurementType, proTableValueEnum(dictData[procurementTypeEntrust])), }, { title: '所属区域', @@ -161,7 +161,7 @@ const ProjectManage: React.FC = (props) => { } pagination={{ defaultPageSize: 10, - defaultCurrent: isNotEmpty(current) ? Number(current) : 1 , + defaultCurrent: isNotEmpty(current) ? Number(current) : 1, size: "small", showSizeChanger: false, onChange: (page, pageSize) => pageDataSet({ pageNo: page, pageSize: pageSize }), diff --git a/src/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/components/ProjectDocumentation.tsx b/src/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/components/ProjectDocumentation.tsx index e1853e2..49c9350 100644 --- a/src/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/components/ProjectDocumentation.tsx +++ b/src/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/components/ProjectDocumentation.tsx @@ -1,14 +1,14 @@ import React, { useState } from 'react'; import { queryingPagingData } from '@/utils/PageUtils'; -import { getDictNameByVal, getProjectTypeCode, getURLInformation, getUrlParam, getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnumOther } from '@/utils/CommonUtils'; +import { getDictNameByVal, getProjectTypeCode, getURLInformation, getUrlParam, getUrlRelativePath, isEmpty, isNotEmpty, multipleTypeTransform, proTableValueEnum, proTableValueEnumOther } from '@/utils/CommonUtils'; import { useHistory } from 'umi'; -import { followUpAProjectManager, getDicData, projectDataItem, getSessionUserData } from '@/utils/session'; +import { followUpAProjectManager, getDicData, projectDataItem, getSessionUserData } from '@/utils/session'; import ExceptionHandling from './ExceptionHandling/ExceptionHandling'; 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' //智慧客服 +import { submitHiddenForm, createHiddenForm } from '@/utils/CustomerService' //智慧客服 //标的类型 const procurementTypeEntrust = 'procurement_type=entrust'; //采购方式 @@ -86,7 +86,7 @@ const ProjectDocumentation: React.FC = () => { - 标的类型:{getDictNameByVal(dictData[procurementTypeEntrust], record.procurementType)}
+ 标的类型:{multipleTypeTransform(record.procurementType, proTableValueEnum(dictData[procurementTypeEntrust]))}
{ @@ -277,93 +277,93 @@ const ProjectDocumentation: React.FC = () => { * 项目跟进 * @param data */ - const saveTmpForm = (record:any)=>{//智慧客服-创建临时表单 + 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: 'origin', + isEncode: false, + paraVal: 'eBid', }, { - label:null, - paraName:'organizationId', - isEncode:false, + label: null, + paraName: 'organizationId', + isEncode: false, paraVal: data.organizationId, }, { - label:'项目名称', - paraName:'projectName', - isEncode:true, - paraVal:record.projectName, + label: '项目名称', + paraName: 'projectName', + isEncode: true, + paraVal: record.projectName, }, { - label:'项目编号 ', - paraName:'ebpProjectNumber', - isEncode:true, - paraVal:record.ebpProjectNumber, + label: '项目编号 ', + paraName: 'ebpProjectNumber', + isEncode: true, + paraVal: record.ebpProjectNumber, }, { - label:'项目流水号', - paraName:'projectBizNum', - isEncode:false, - paraVal:record.projectBizNum, + label: '项目流水号', + paraName: 'projectBizNum', + isEncode: false, + paraVal: record.projectBizNum, }, { - label:null, - paraName:'tenderAgencyId', - isEncode:false, - paraVal:'EMPTY', + label: null, + paraName: 'tenderAgencyId', + isEncode: false, + paraVal: 'EMPTY', }, { - label:null, - paraName:'tenderAgencyName', - isEncode:true, - paraVal:'招投标客服', + 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: '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: 'tendereeName', + isEncode: true, + paraVal: record.tendereeName, }, { - label:'实施单位', - paraName:'providerName', - isEncode:true, - paraVal:record.tenderAgencyName, + label: '实施单位', + paraName: 'providerName', + isEncode: true, + paraVal: record.tenderAgencyName, }, { - label:'实施人员', - paraName:'ownerContactName', - isEncode:true, - paraVal:record.appManagerName+'-'+record.appManagerId+'-'+record.appManagerTel + 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: 'roleAuthority', + isEncode: false, + paraVal: JSON.parse(roleAuthority)[0], }, { - label:null, - paraName:'module', - isEncode:false, - paraVal:'2', + label: null, + paraName: 'module', + isEncode: false, + paraVal: '2', }, { - label:null, - paraName:'custType', - isEncode:false, - paraVal:'1', + label: null, + paraName: 'custType', + isEncode: false, + paraVal: '1', }, ] createHiddenForm(inputList, window.location.pathname) diff --git a/src/pages/Project/ProjectManage/ProjectManager/ProjectInformationManagement/components/ProcurementMethod7.tsx b/src/pages/Project/ProjectManage/ProjectManager/ProjectInformationManagement/components/ProcurementMethod7.tsx index f2dc834..10e78c0 100644 --- a/src/pages/Project/ProjectManage/ProjectManager/ProjectInformationManagement/components/ProcurementMethod7.tsx +++ b/src/pages/Project/ProjectManage/ProjectManager/ProjectInformationManagement/components/ProcurementMethod7.tsx @@ -7,7 +7,7 @@ import { ProcurementMethodItem, updateUtils } from '../utils'; import { getId7 } from '../service'; import ProTable from '@ant-design/pro-table'; import { getDicData } from '@/utils/session'; -import { getDictName, isEmpty } from '@/utils/CommonUtils'; +import { getDictName, isEmpty, multipleTypeTransform, proTableValueEnum } from '@/utils/CommonUtils'; const { Option } = Select; @@ -77,7 +77,7 @@ const ProjectDocumentation: React.FC = (props) => { //组织方式字典项 data.bidOrgDict = getDictName(dictData['organization=entrust'], data.bidOrgDict); //采购类型字典项 - data.procurementType = getDictName(dictData['procurement_type=entrust'], data.procurementType); + data.procurementType = multipleTypeTransform(data.procurementType, proTableValueEnum(dictData['procurement_type=entrust'])); form.setFieldsValue(data); } }) diff --git a/src/pages/Project/ProjectManage/ProjectManager/PurchasingManagerEnquiries/components/PurchasingManagerEnquiries.tsx b/src/pages/Project/ProjectManage/ProjectManager/PurchasingManagerEnquiries/components/PurchasingManagerEnquiries.tsx index e026051..c61f1d3 100644 --- a/src/pages/Project/ProjectManage/ProjectManager/PurchasingManagerEnquiries/components/PurchasingManagerEnquiries.tsx +++ b/src/pages/Project/ProjectManage/ProjectManager/PurchasingManagerEnquiries/components/PurchasingManagerEnquiries.tsx @@ -7,7 +7,7 @@ * @FilePath: \ebtp-cloud-frontend\src\pages\Project\ProjectManage\ProjectManager\PurchasingManagerEnquiries\index.tsx */ -import { getURLInformation, getUrlParam, getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnum } from '@/utils/CommonUtils'; +import { getURLInformation, getUrlParam, getUrlRelativePath, isEmpty, isNotEmpty, multipleTypeTransform, proTableValueEnum } from '@/utils/CommonUtils'; import { queryingPagingData } from '@/utils/PageUtils'; import { followUpAProjectManager, getDicData, setPurchaseCanOperate, getSessionUserData } from '@/utils/session'; import ProTable, { ProColumns } from '@ant-design/pro-table'; @@ -15,264 +15,264 @@ 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' //智慧客服 +import { submitHiddenForm, createHiddenForm } from '@/utils/CustomerService' //智慧客服 const PurchasingManagerEnquiries: React.FC = () => { - //获取字典 - const getDict: any = getDicData(); - const dictData = JSON.parse(getDict); - const [projectParams, setProjectParams] = useState(""); - //url项目名称 - const projectName = getUrlParam("projectName"); - //url采购方式 - const bidMethodDict = getURLInformation("bidMethodDict"); - //标的类型 - const procurementTypeEntrust = 'procurement_type=entrust'; - //采购方式 - const procurementModeEntrust = 'procurement_mode=entrust'; - const history = useHistory(); - const columns: ProColumns[] = [ - { - title: '序号', - valueType: 'index', - width: 50, - }, - { - title: '采购方式', - dataIndex: 'bidMethodDict', - width: '8%', - initialValue: bidMethodDict, - valueEnum: proTableValueEnum(dictData[procurementModeEntrust]), - }, - { - title: '项目名称', - dataIndex: 'projectName', - initialValue: projectName - }, - { - title: '我要咨询', - dataIndex: 'consult', - render: (text: any, record: any) => ( - {saveTmpForm(record); initChatUI()}}> - ), - }, - { - title: '项目编号', - dataIndex: 'ebpProjectNumber', - search: false, - width: '10%', - }, - { - title: '采购人', - dataIndex: 'tendereeOrgName', - search: false, - width: '15%', - }, - { - title: '建档时间', - dataIndex: 'createDate', - search: false, - width: '10%', - }, - { - title: '标的类型', - dataIndex: 'procurementType', - width: '8%', - search: false, - valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), - }, - { - title: '所属区域', - dataIndex: 'regionDictName', - search: false, - width: '10%', - }, - { - title: '操作', - valueType: 'option', - width: 150, - render: (_: any, record: any) => - ( - <> - - - ) - }, - ]; - 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 - */ - const getReturnURL = () => { - let projectURLParams = JSON.parse(projectParams); - let params = `${'?current=' + projectURLParams.current}${isEmpty(projectURLParams.projectName) ? '' : '&projectName=' + projectURLParams.projectName}${isEmpty(projectURLParams.bidMethodDict) ? '' : '&bidMethodDict=' + projectURLParams.bidMethodDict}`; - return getUrlRelativePath() + params; - } - /** - * 项目跟进 - * @param data - */ - const followUpProject = async (data: any) => { - saveTmpForm(data) - data.returnURL = getReturnURL() - await followUpAProjectManager(data); - setPurchaseCanOperate(); - history.push('/ProjectLayout/Manager/HomePageSectionList'); - }; - - return ( + //获取字典 + const getDict: any = getDicData(); + const dictData = JSON.parse(getDict); + const [projectParams, setProjectParams] = useState(""); + //url项目名称 + const projectName = getUrlParam("projectName"); + //url采购方式 + const bidMethodDict = getURLInformation("bidMethodDict"); + //标的类型 + const procurementTypeEntrust = 'procurement_type=entrust'; + //采购方式 + const procurementModeEntrust = 'procurement_mode=entrust'; + const history = useHistory(); + const columns: ProColumns[] = [ + { + title: '序号', + valueType: 'index', + width: 50, + }, + { + title: '采购方式', + dataIndex: 'bidMethodDict', + width: '8%', + initialValue: bidMethodDict, + valueEnum: proTableValueEnum(dictData[procurementModeEntrust]), + }, + { + title: '项目名称', + dataIndex: 'projectName', + initialValue: projectName + }, + { + title: '我要咨询', + dataIndex: 'consult', + render: (text: any, record: any) => ( + { saveTmpForm(record); initChatUI() }}> + ), + }, + { + title: '项目编号', + dataIndex: 'ebpProjectNumber', + search: false, + width: '10%', + }, + { + title: '采购人', + dataIndex: 'tendereeOrgName', + search: false, + width: '15%', + }, + { + title: '建档时间', + dataIndex: 'createDate', + search: false, + width: '10%', + }, + { + title: '标的类型', + dataIndex: 'procurementType', + width: '8%', + search: false, + render: (_, record) => multipleTypeTransform(record.procurementType, proTableValueEnum(dictData[procurementTypeEntrust])), + }, + { + title: '所属区域', + dataIndex: 'regionDictName', + search: false, + width: '10%', + }, + { + title: '操作', + valueType: 'option', + width: 150, + render: (_: any, record: any) => + ( <> - - - { - const res = queryingPagingData( - '/api/biz-service-ebtp-project/v1/projectRecord/purchase/getPage', - 'post', - params, - ) - setProjectParams(JSON.stringify(params)); - return res - }} - options={false} - rowKey="id" - pagination={{ defaultPageSize: 10 }} - size="small" - search={{ - filterType: "query", - optionRender: (searchConfig: any, { form }) => { - return [ - , - , - ]; - }, - }} - /> - + - ) + ) + }, + ]; + 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 + */ + const getReturnURL = () => { + let projectURLParams = JSON.parse(projectParams); + let params = `${'?current=' + projectURLParams.current}${isEmpty(projectURLParams.projectName) ? '' : '&projectName=' + projectURLParams.projectName}${isEmpty(projectURLParams.bidMethodDict) ? '' : '&bidMethodDict=' + projectURLParams.bidMethodDict}`; + return getUrlRelativePath() + params; + } + /** + * 项目跟进 + * @param data + */ + const followUpProject = async (data: any) => { + saveTmpForm(data) + data.returnURL = getReturnURL() + await followUpAProjectManager(data); + setPurchaseCanOperate(); + history.push('/ProjectLayout/Manager/HomePageSectionList'); + }; + + return ( + <> + + + { + const res = queryingPagingData( + '/api/biz-service-ebtp-project/v1/projectRecord/purchase/getPage', + 'post', + params, + ) + setProjectParams(JSON.stringify(params)); + return res + }} + options={false} + rowKey="id" + pagination={{ defaultPageSize: 10 }} + size="small" + search={{ + filterType: "query", + optionRender: (searchConfig: any, { form }) => { + return [ + , + , + ]; + }, + }} + /> + + + ) } export default PurchasingManagerEnquiries; \ No newline at end of file diff --git a/src/pages/Project/ProjectManage/Supervision/components/FavoritesList.tsx b/src/pages/Project/ProjectManage/Supervision/components/FavoritesList.tsx index 34a7e40..b39a4f0 100644 --- a/src/pages/Project/ProjectManage/Supervision/components/FavoritesList.tsx +++ b/src/pages/Project/ProjectManage/Supervision/components/FavoritesList.tsx @@ -1,4 +1,4 @@ -import { getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnum } from '@/utils/CommonUtils'; +import { getUrlRelativePath, isEmpty, isNotEmpty, multipleTypeTransform, proTableValueEnum } from '@/utils/CommonUtils'; import { followUpAProjectManager, getDicData, setPurchaseCanOperate } from '@/utils/session'; import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; import { Button, message, Popconfirm, Spin, Space, Tag } from 'antd'; @@ -98,7 +98,7 @@ const FavoritesList: React.FC = (props) => { dataIndex: 'procurementType', width: '5%', search: false, - valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), + render: (_, record) => multipleTypeTransform(record.procurementType, proTableValueEnum(dictData[procurementTypeEntrust])), }, { title: '所属区域', diff --git a/src/pages/Project/ProjectManage/Supervision/components/ProjectManage.tsx b/src/pages/Project/ProjectManage/Supervision/components/ProjectManage.tsx index bde5c17..02d3325 100644 --- a/src/pages/Project/ProjectManage/Supervision/components/ProjectManage.tsx +++ b/src/pages/Project/ProjectManage/Supervision/components/ProjectManage.tsx @@ -1,4 +1,4 @@ -import { getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnum } from '@/utils/CommonUtils'; +import { getUrlRelativePath, isEmpty, isNotEmpty, multipleTypeTransform, proTableValueEnum } from '@/utils/CommonUtils'; import { followUpAProjectManager, getDicData, setPurchaseCanOperate } from '@/utils/session'; import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; import { Button, message, Space, Spin, Tag } from 'antd'; @@ -84,7 +84,7 @@ const ProjectManage: React.FC = (props) => { dataIndex: 'procurementType', width: '5%', search: false, - valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), + render: (_, record) => multipleTypeTransform(record.procurementType, proTableValueEnum(dictData[procurementTypeEntrust])), }, { title: '所属区域', diff --git a/src/pages/Tender/ProjectsInvolved/index.tsx b/src/pages/Tender/ProjectsInvolved/index.tsx index f0be672..fa9aedd 100644 --- a/src/pages/Tender/ProjectsInvolved/index.tsx +++ b/src/pages/Tender/ProjectsInvolved/index.tsx @@ -3,14 +3,14 @@ import { Button, Tabs, Form, Input, Modal, Checkbox, message, PageHeader, Popcon 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,getSessionUserData } from '@/utils/session'; +import { getProMethod, getSessionUserData } 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 { getDictName, getProjectTypeCode, getURLInformation, getUrlParam, getUrlRelativePath, isEmpty, isNotEmpty, multipleTypeTransform, proTableValueEnum, proTableValueEnumOther } from '@/utils/CommonUtils'; import { btnAuthority } from '@/utils/authority'; import kefu from '@/assets/img/kefu.png' //智慧客服 -import {submitHiddenForm, createHiddenForm} from '@/utils/CustomerService' //智慧客服 +import { submitHiddenForm, createHiddenForm } from '@/utils/CustomerService' //智慧客服 const { TabPane } = Tabs; const { TextArea } = Input; @@ -127,7 +127,7 @@ const Index: React.FC<{}> = () => { title: '我要咨询', dataIndex: 'consult', render: (text: any, record: any) => ( - {saveTmpForm(record); initChatUI()}}> + { saveTmpForm(record); initChatUI() }}> ), }, { @@ -145,9 +145,9 @@ const Index: React.FC<{}> = () => { { title: '项目分类', dataIndex: 'procurementType', - valueEnum: proTableValueEnum(dictData['procurement_type=entrust']), search: false, - width: '5%' + width: '5%', + render: (_: any, record: any) => multipleTypeTransform(record.procurementType, proTableValueEnum(dictData['procurement_type=entrust'])), }, { title: '所属区域', @@ -371,7 +371,7 @@ const Index: React.FC<{}> = () => { onOk() { if (checkedList.length > 0) { //quitForm.getFieldValue().checkbox = checkedList 报错——林杰注释 - quitForm.setFieldsValue({checkbox: checkedList}) + quitForm.setFieldsValue({ checkbox: checkedList }) } quitForm.submit() setCheckAll(false) @@ -390,12 +390,12 @@ const Index: React.FC<{}> = () => { const submitQuit = (val: any) => { // 确定并进行校验 exitProjectPayCheck(checkedList).then((res: any) => { - if(res.data && res.data != null){ + if (res.data && res.data != null) { showConfirm(res.data) } else { if (checkedList.length > 0) { //quitForm.getFieldValue().checkbox = checkedList 报错——林杰注释 - quitForm.setFieldsValue({checkbox: checkedList}) + quitForm.setFieldsValue({ checkbox: checkedList }) } quitForm.submit() setCheckAll(false) @@ -405,98 +405,98 @@ const Index: React.FC<{}> = () => { } }) } - const saveTmpForm = (record:any)=>{//智慧客服-创建临时表单 + 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: 'origin', + isEncode: false, + paraVal: 'eBid', }, { - label:null, - paraName:'organizationId', - isEncode:false, + label: null, + paraName: 'organizationId', + isEncode: false, paraVal: data.organizationId, }, { - label:'项目名称', - paraName:'projectName', - isEncode:true, - paraVal:record.projectName, + label: '项目名称', + paraName: 'projectName', + isEncode: true, + paraVal: record.projectName, }, { - label:'项目编号', - paraName:'ebpProjectNumber', - isEncode:false, - paraVal:record.ebpProjectNumber, + label: '项目编号', + paraName: 'ebpProjectNumber', + isEncode: false, + paraVal: record.ebpProjectNumber, }, { - label:'项目流水号', - paraName:'projectBizNum', - isEncode:false, - paraVal:record.projectBizNum, + label: '项目流水号', + paraName: 'projectBizNum', + isEncode: false, + paraVal: record.projectBizNum, }, { - label:null, - paraName:'tenderAgencyId', - isEncode:false, - paraVal:record.tenderAgencyId, + label: null, + paraName: 'tenderAgencyId', + isEncode: false, + paraVal: record.tenderAgencyId, }, { - label:null, - paraName:'tenderAgencyName', - isEncode:true, - paraVal:record.tenderAgencyName, + label: null, + paraName: 'tenderAgencyName', + isEncode: true, + paraVal: record.tenderAgencyName, }, { - label:'项目状态', - paraName:'status', - isEncode:false, - paraVal:record.status==1?'编辑中':record.status==2?'进行中':record.status==3?'已结束':record.status==9?'废止':'无效状态', + 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: 'tendereeName', + isEncode: true, + paraVal: record.tendereeName, }, { - label:'实施单位', - paraName:'providerName', - isEncode:true, - paraVal:record.tenderAgencyName, + label: '实施单位', + paraName: 'providerName', + isEncode: true, + paraVal: record.tenderAgencyName, }, { - label:'实施人员', - paraName:'ownerContactName', - isEncode:true, - paraVal:record.appManagerName+'-'+record.appManagerId+'-'+record.appManagerTel + 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: 'roleAuthority', + isEncode: false, + paraVal: JSON.parse(roleAuthority)[0], }, { - label:null, - paraName:'module', - isEncode:false, - paraVal:'10', + label: null, + paraName: 'module', + isEncode: false, + paraVal: '10', }, { - label:null, - paraName:'custType', - isEncode:false, - paraVal:'2', + label: null, + paraName: 'custType', + isEncode: false, + paraVal: '2', }, ] createHiddenForm(inputList, window.location.pathname) } - const initChatUI = ()=>{ //打开客服界面 + const initChatUI = () => { //打开客服界面 submitHiddenForm() } return ( diff --git a/src/pages/Tender/supplier/InvitationLetter/components/InvitationLetter.tsx b/src/pages/Tender/supplier/InvitationLetter/components/InvitationLetter.tsx index eafd51f..10e04ab 100644 --- a/src/pages/Tender/supplier/InvitationLetter/components/InvitationLetter.tsx +++ b/src/pages/Tender/supplier/InvitationLetter/components/InvitationLetter.tsx @@ -6,15 +6,15 @@ import { lookingForBussinessResp, participationSave } from '../service'; import '@/utils/lq.style.less'; import { downloadAttachmentPath } from '@/utils/DownloadUtils'; import { getNoticeInfo } from '../../LookingForBusinessOpportunities/service'; -import { getDicData,getSessionUserData } from '@/utils/session'; -import { getBidMethodDictTypeCode, getProjectTypeCode, getURLInformation, isNotEmpty, proTableValueEnum, proTableValueEnumOther } from '@/utils/CommonUtils'; +import { getDicData, getSessionUserData } from '@/utils/session'; +import { getBidMethodDictTypeCode, getProjectTypeCode, getURLInformation, isNotEmpty, multipleTypeTransform, proTableValueEnum, proTableValueEnumOther } from '@/utils/CommonUtils'; import Weboffice from "@/pages/webOffice/weboffice"; import { queryingPagingData } from '@/utils/PageUtils'; import ExtendUpload from '@/utils/ExtendUpload'; import { btnAuthority } from '@/utils/authority'; import BraftText from '@/components/richText/wang'; import kefu from '@/assets/img/kefu.png' //智慧客服 -import {windowOpenChatUI} from '@/utils/CustomerService' //智慧客服 +import { windowOpenChatUI } from '@/utils/CustomerService' //智慧客服 const { TabPane } = Tabs; const modalHeight = innerHeight * 96 / 100; @@ -88,91 +88,91 @@ const LookingForBusinessOpportunitiesList: React.FC = () => { //获取当前页是哪种采购方式 const proTypeCode = getProjectTypeCode(); - const initChatUI = (record:any)=>{//智慧客服-创建临时表单 + const initChatUI = (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:'bidMethodDict', - isEncode:true, - paraVal:record.bidMethodDict=='procurement_mode_1'?'公开招标':record.bidMethodDict=='procurement_mode_2'?'邀请招标':record.bidMethodDict=='procurement_mode_3'?'公开比选':record.bidMethodDict=='procurement_mode_4'?'公开招募':record.bidMethodDict=='procurement_mode_5'?'竞争性谈判':record.bidMethodDict=='procurement_mode_6'?'单一来源':record.bidMethodDict=='procurement_mode_7'?'公开询价':record.bidMethodDict=='procurement_mode_8'?'竞拍':record.bidMethodDict=='procurement_mode_9'?'单一来源简化流程':'-', - }, - { - label:'采购人', - paraName:'tendereeOrgName', - isEncode:true, - paraVal:record.tendereeOrgName, - }, - { - label:'代理机构', - paraName:'tenderAgencyName', - isEncode:true, - paraVal:record.tenderAgencyName, - }, - { - label:null, - paraName:'tenderAgencyId', - isEncode:false, - paraVal:record.tenderAgencyId, - }, - { - label:null, - paraName:'tenderAgencyName', - isEncode:true, - paraVal:record.tenderAgencyName, - }, - { - label:'项目分类', - paraName:'procurementType', - isEncode:false, - paraVal:record.procurementType=='procurement_type_1'?'货物':record.procurementType=='procurement_type_2'?'工程':record.procurementType=='procurement_type_3'?'服务':record.procurementType=='procurement_type_4'?'其他':'-', - }, - { - label:'所属区域', - paraName:'regionDictName', - isEncode:true, - paraVal:record.regionDictName, - }, - { - label:null, - paraName:'roleAuthority', - isEncode:false, - paraVal:JSON.parse(roleAuthority)[0], - }, - { - label:null, - paraName:'module', - isEncode:false, - paraVal:'10', - }, - { - label:null, - paraName:'custType', - isEncode:false, - paraVal:'2', - }, + { + 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: 'bidMethodDict', + isEncode: true, + paraVal: record.bidMethodDict == 'procurement_mode_1' ? '公开招标' : record.bidMethodDict == 'procurement_mode_2' ? '邀请招标' : record.bidMethodDict == 'procurement_mode_3' ? '公开比选' : record.bidMethodDict == 'procurement_mode_4' ? '公开招募' : record.bidMethodDict == 'procurement_mode_5' ? '竞争性谈判' : record.bidMethodDict == 'procurement_mode_6' ? '单一来源' : record.bidMethodDict == 'procurement_mode_7' ? '公开询价' : record.bidMethodDict == 'procurement_mode_8' ? '竞拍' : record.bidMethodDict == 'procurement_mode_9' ? '单一来源简化流程' : '-', + }, + { + label: '采购人', + paraName: 'tendereeOrgName', + isEncode: true, + paraVal: record.tendereeOrgName, + }, + { + label: '代理机构', + paraName: 'tenderAgencyName', + isEncode: true, + paraVal: record.tenderAgencyName, + }, + { + label: null, + paraName: 'tenderAgencyId', + isEncode: false, + paraVal: record.tenderAgencyId, + }, + { + label: null, + paraName: 'tenderAgencyName', + isEncode: true, + paraVal: record.tenderAgencyName, + }, + { + label: '项目分类', + paraName: 'procurementType', + isEncode: false, + paraVal: multipleTypeTransform(record.procurementType, proTableValueEnum(dictData[procurementTypeEntrust])), + }, + { + label: '所属区域', + paraName: 'regionDictName', + isEncode: true, + paraVal: record.regionDictName, + }, + { + label: null, + paraName: 'roleAuthority', + isEncode: false, + paraVal: JSON.parse(roleAuthority)[0], + }, + { + label: null, + paraName: 'module', + isEncode: false, + paraVal: '10', + }, + { + label: null, + paraName: 'custType', + isEncode: false, + paraVal: '2', + }, ] windowOpenChatUI(inputList, window.location.pathname) - } + } useEffect(() => { setTableLoading(true); lookingForBussinessResp({ procurementMode: proTypeCode }).then((res: any) => { @@ -204,7 +204,7 @@ const LookingForBusinessOpportunitiesList: React.FC = () => { title: '我要咨询', dataIndex: 'consult', render: (text: any, record: any) => ( - {initChatUI(record)}}> + { initChatUI(record) }}> ), }, { @@ -224,7 +224,7 @@ const LookingForBusinessOpportunitiesList: React.FC = () => { dataIndex: 'procurementType', width: '8%', search: false, - valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]) + render: (_: any, record: any) => multipleTypeTransform(record.procurementType, proTableValueEnum(dictData[procurementTypeEntrust])), }, { title: '所属区域', diff --git a/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx b/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx index 0eee7e3..54384dd 100644 --- a/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx +++ b/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx @@ -11,14 +11,14 @@ import { } from '../service'; import '@/utils/lq.style.less'; import { downloadAttachmentPath } from '@/utils/DownloadUtils'; -import { getDicData,getSessionUserData } from '@/utils/session'; -import { proTableValueEnum, getURLInformation, isNotEmpty, proTableValueEnumOther, getProjectTypeCode, getBidMethodDictTypeCode, getDictName } from '@/utils/CommonUtils'; +import { getDicData, getSessionUserData } from '@/utils/session'; +import { proTableValueEnum, getURLInformation, isNotEmpty, proTableValueEnumOther, getProjectTypeCode, getBidMethodDictTypeCode, getDictName, multipleTypeTransform } from '@/utils/CommonUtils'; import Weboffice from "@/pages/webOffice/weboffice"; import { queryingPagingData } from '@/utils/PageUtils'; import ExtendUpload from '@/utils/ExtendUpload'; import { btnAuthority } from '@/utils/authority'; import kefu from '@/assets/img/kefu.png' //智慧客服 -import {windowOpenChatUI} from '@/utils/CustomerService' //智慧客服 +import { windowOpenChatUI } from '@/utils/CustomerService' //智慧客服 const { TabPane } = Tabs; //标的类型 @@ -108,93 +108,93 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => { } return '标段'; } - const initChatUI = (record:any)=>{//智慧客服-创建临时表单 + const initChatUI = (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: 'origin', + isEncode: false, + paraVal: 'eBid', }, { - label:null, - paraName:'organizationId', - isEncode:false, + label: null, + paraName: 'organizationId', + isEncode: false, paraVal: data.organizationId, }, { - label:'项目名称', - paraName:'projectName', - isEncode:true, - paraVal:record.projectName, + label: '项目名称', + paraName: 'projectName', + isEncode: true, + paraVal: record.projectName, }, { - label:'项目编号', - paraName:'ebpProjectNumber', - isEncode:false, - paraVal:record.ebpProjectNumber, + label: '项目编号', + paraName: 'ebpProjectNumber', + isEncode: false, + paraVal: record.ebpProjectNumber, }, { - label:'项目流水号', - paraName:'projectBizNum', - isEncode:false, - paraVal:record.projectBizNum, + label: '项目流水号', + paraName: 'projectBizNum', + isEncode: false, + paraVal: record.projectBizNum, }, { - label:null, - paraName:'tenderAgencyId', - isEncode:false, - paraVal:record.tenderAgencyId, + label: null, + paraName: 'tenderAgencyId', + isEncode: false, + paraVal: record.tenderAgencyId, }, { - label:null, - paraName:'tenderAgencyName', - isEncode:true, - paraVal:record.tenderAgencyName, + label: null, + paraName: 'tenderAgencyName', + isEncode: true, + paraVal: record.tenderAgencyName, }, { - label:'项目状态', - paraName:'status', - isEncode:false, - paraVal:record.status==1?'编辑中':record.status==2?'进行中':record.status==3?'已结束':record.status==9?'废止':'无效状态', + 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: 'tendereeName', + isEncode: true, + paraVal: record.tendereeName, }, { - label:'实施单位', - paraName:'providerName', - isEncode:true, - paraVal:record.tenderAgencyName, + label: '实施单位', + paraName: 'providerName', + isEncode: true, + paraVal: record.tenderAgencyName, }, { - label:'实施人员', - paraName:'ownerContactName', - isEncode:true, - paraVal:record.appManagerName+'-'+record.appManagerId+'-'+record.appManagerTel + 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: 'roleAuthority', + isEncode: false, + paraVal: JSON.parse(roleAuthority)[0], }, { - label:null, - paraName:'module', - isEncode:false, - paraVal:'10', + label: null, + paraName: 'module', + isEncode: false, + paraVal: '10', }, { - label:null, - paraName:'custType', - isEncode:false, - paraVal:'2', + label: null, + paraName: 'custType', + isEncode: false, + paraVal: '2', }, ] windowOpenChatUI(inputList, window.location.pathname) @@ -252,7 +252,7 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => { title: '我要咨询', dataIndex: 'consult', render: (text: any, record: any) => ( - {initChatUI(record)}}> + { initChatUI(record) }}> ), }, { @@ -271,8 +271,8 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => { title: '项目分类', dataIndex: 'procurementType', width: '5%', - valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), search: false, + render: (_: any, record: any) => multipleTypeTransform(record.procurementType, proTableValueEnum(dictData[procurementTypeEntrust])), }, { title: '所属区域', diff --git a/src/pages/Tender/supplier/LookingForBusinessOpportunities/service.ts b/src/pages/Tender/supplier/LookingForBusinessOpportunities/service.ts index 88d9d06..d5fee9c 100644 --- a/src/pages/Tender/supplier/LookingForBusinessOpportunities/service.ts +++ b/src/pages/Tender/supplier/LookingForBusinessOpportunities/service.ts @@ -7,17 +7,16 @@ * @Description: In User Settings Edit * @FilePath: \ebtp-cloud-frontend\src\pages\LookingForBusinessOpportunities\service.ts */ -import { isEmpty } from '@/utils/CommonUtils'; import request from '@/utils/request'; /** * 我要参与 保存 */ export async function participationSave(data: any) { - /*更改接口地址 /v1/recruit/register/save */ - return request('/api/biz-service-ebtp-tender/v1/supplier_register/save', { - method: 'post', - data: data - }); + /*更改接口地址 /v1/recruit/register/save */ + return request('/api/biz-service-ebtp-tender/v1/supplier_register/save', { + method: 'post', + data: data + }); } /** * 我要参与 保存 招募用 @@ -30,32 +29,30 @@ export async function participationSaveOther(data: any) { } /** * 寻找商机 - * @param procurementType * @param data */ export function lookingForBussiness(data: any) { - /*招募 url 2021 02 17*/ + /*招募 url 2021 02 17*/ - return new Promise((resolve, reject) => { - request('/api/biz-service-ebtp-tender/v1/supplier_register/looking_for_bussiness', { - method: 'post', - data: { - ...data, - procurementMode:data?.bidMethodDict==undefined?data.procurementMode:[data.bidMethodDict], - type:data.type - } - }).then(res => { - if (res.code === 200) { - resolve({ data: res.data }); - } else { - reject({ data: [] }); - } - }) + return new Promise((resolve, reject) => { + request('/api/biz-service-ebtp-tender/v1/supplier_register/looking_for_bussiness', { + method: 'post', + data: { + ...data, + procurementMode: data?.bidMethodDict == undefined ? data.procurementMode : [data.bidMethodDict], + type: data.type + } + }).then(res => { + if (res.code === 200) { + resolve({ data: res.data }); + } else { + reject({ data: [] }); + } }) + }) } /** * 寻找商机 招募专用 - * @param procurementType * @param data */ export function lookingForBussinessOther(data: any) { @@ -66,8 +63,8 @@ export function lookingForBussinessOther(data: any) { method: 'post', data: { ...data, - procurementMode:data?.bidMethodDict==undefined?data.procurementMode:[data.bidMethodDict], - type:data.type + procurementMode: data?.bidMethodDict == undefined ? data.procurementMode : [data.bidMethodDict], + type: data.type } }).then(res => { if (res.code === 200) { @@ -83,17 +80,17 @@ export function lookingForBussinessOther(data: any) { * @param ids */ export async function getNoticeInfo(ids: any) { - return new Promise((resolve, reject) => { - request('/api/biz-service-ebtp-bid/v1/anno/getByIds', { - method: 'post', - data: ids - }).then(res => { - if (res.data !== null && res.data !== void 0) { - resolve({ data: res.data }); - } else { - reject({ data: [] }); - } - }) + return new Promise((resolve, reject) => { + request('/api/biz-service-ebtp-bid/v1/anno/getByIds', { + method: 'post', + data: ids + }).then(res => { + if (res.data !== null && res.data !== void 0) { + resolve({ data: res.data }); + } else { + reject({ data: [] }); + } }) + }) } diff --git a/src/utils/CommonUtils.ts b/src/utils/CommonUtils.ts index ed36dd2..52ee6b4 100644 --- a/src/utils/CommonUtils.ts +++ b/src/utils/CommonUtils.ts @@ -50,6 +50,15 @@ export function returnDictVal(data: any, value: any) { } return val; } +/** + * procurementType标的类型转换多个 20220927 + */ +export function multipleTypeTransform(value: string | null | undefined, valueEnum: any): string { + if (valueEnum && value) { + return value.split(",").map(item => valueEnum[item].text).join(); + } + return "-"; +} /** * 获取url路径信息