所属者选择更新样式

This commit is contained in:
lyp 2025-03-13 15:43:27 +08:00
parent 73e21353c2
commit dc02e82aec
8 changed files with 574 additions and 164 deletions

View File

@ -1011,7 +1011,7 @@ export default function CardProj(props: any) {
</div> */}
<div className='cpbc-bot' style={{ color: '#FFA415' }} title={data.apply.authorName}>
:{data.apply.authorName}
: {data.apply.authorName?data.apply.authorName:'无'}
</div>
</div>
{/* <div className='cline'></div> */}

View File

@ -1,6 +1,8 @@
@media (max-width: 1550px) {
.menu-with-top-button {
/* padding: 15px; */
border-bottom: 1px solid #fde9ab;
/* border-bottom: 1px solid #e22222; */
}
.menu-with-top-button .top {
@ -105,6 +107,8 @@
@media (min-width: 1551px){
.menu-with-top-button {
/* padding: 15px; */
border-bottom: 1px solid #fde9ab;
/* border-bottom: 1px solid #e22222; */
}
.menu-with-top-button .top {

View File

@ -1137,7 +1137,7 @@ export default function Correction() {
</div>
<div className='projInfo'>
<div className='projPeople' title={item.authorName}>
{item.authorName}
: {item.authorName?item.authorName:'无'}
</div>
<div className='projImg'>
<div> </div>

View File

@ -672,7 +672,7 @@ export default function Refun() {
</div>
<div className='projInfo'>
<div className='projPeople' title={item.authorName}>
{item.authorName}
: {item.authorName?item.authorName:'无'}
</div>
<div className='projImg'>
<div> 退</div>

View File

@ -3,7 +3,10 @@ import './index.css';
import { MouseEvent, Reducer, useEffect, useReducer, useState } from "react";
import { useSelector, useDispatch } from 'react-redux'
import { useNavigate, useSearchParams, Outlet } from "react-router-dom";
import { Modal } from 'antd';
import {
Modal,
// Row
} from 'antd';
import { IMenuListItem, IMenuWithTopButton } from "../../interfaces/menu/IMenuWithTopButton.ts";
import MenuWithTopButton from "../../components/menu/MenuWithTopButton.tsx";
import RefunModal from '../../components/RefunModal/RefunModal.tsx'
@ -17,8 +20,10 @@ import ContractModal from '../../components/ContractModal/ContractModal.tsx'
import {
MenuProps, Select,
Button,
Pagination,
Empty
// Pagination,
// Empty
Table,
Spin
} from 'antd';
import {
IndexListContext,
@ -29,14 +34,17 @@ import {
} from "../../context/IndexListContext.ts";
// import { getMenuActive } from '../../util/cache.ts'
import {
MenuFoldOutlined,
// MenuFoldOutlined,
ClearOutlined,
CloseOutlined
CloseOutlined,
CloseCircleOutlined
} from '@ant-design/icons';
import { useLocation } from 'react-router-dom';
import { get,
import {
get,
// downloadUrl,
post, getCouponUrl } from '../../util/AjaxUtils.ts'
post, getCouponUrl
} from '../../util/AjaxUtils.ts'
import { setMenuActive } from '../../util/cache.ts'
import gpsImg from '../../static/right/gps.png'
import backImg from '../../static/right/back.png'
@ -45,13 +53,61 @@ import HeadCouponModal from '../../components/CouponModal/HeadCouponModal.tsx'
import {
Input,
// Breadcrumb,
Empty,
message
} from 'antd';
import type { TableColumnsType } from 'antd';
const { Search } = Input;
interface DataType {
key: React.Key;
name: string;
type: string;
idCardType: string;
idCardNo: string;
projOwnerId: string
}
export default function Index() {
const columns: TableColumnsType<DataType> = [
{
title: '序号',
dataIndex: 'index',
align: 'center',
width: 80,
render: (_text, _record, index) => (ownerPage - 1) * 10 + index + 1, // 显示序号从1开始
},
{
title: '名称',
dataIndex: 'name',
align: 'center',
// width:100,
ellipsis: {
showTitle: true,
},
},
{
title: '类型',
dataIndex: 'type',
align: 'center',
width: 130,
render: (text: string) => <>{text == 'PERSONAL' ? '个人' : text == 'ORGANIZATION' ? '企业' : '未知类型'}</>,
},
{
title: '证件类型',
dataIndex: 'idCardType',
align: 'center',
render: (text: string) => <>{text == 'ID_CARD' ? '身份证' : text == 'BUSINESS_LICENSE' ? '营业执照' : '未知类型'}</>,
},
{
title: '证件号',
dataIndex: 'idCardNo',
align: 'center',
width: 300
},
];
// 是否可以点击所属者 (当点击了退款选项,所属者列表跟他不产生联系 不给他点)
// const [clickBelongpeople, setClickBelongpeople] = useState(true)
// 补正搜索条件标签数组
@ -141,12 +197,12 @@ export default function Index() {
const dispath = useDispatch()
//redux的belongArray
const redxuState: any = useSelector(state => state)
const belongArray = redxuState.belongArray
// const belongArray = redxuState.belongArray
const belongArrayList = belongArray.map((item:any) => ({
value: item.projOwnerId ,
label: item.name
}));
// const belongArrayList = belongArray.map((item:any) => ({
// value: item.projOwnerId ,
// label: item.name
// }));
// 优惠券弹窗
const couponModal = redxuState.couponModal
@ -157,28 +213,50 @@ export default function Index() {
// 项目状态 查看还是编辑
// const projStatus = redxuState.projStatus
const projStatus = sessionStorage.getItem('projStatus')
// 获取所属者表格储存至redux 更新表格
const getProjOwnerList = () => {
const [loading, setLoading] = useState(false) //表格加载
const [selectBelongPeople, setSelectBelongPeople] = useState(false) //有项目的所属者弹窗
const [ownerPage, setOwnerPage] = useState(1) //有项目的所属者表格页码
const [ownerTotal, setOwnerToatl] = useState(0) //有项目的所属者表格总数居
const [ownerKeyWords, setOwnerKeyWords] = useState('') //在有项目的所属者表格搜索时的关键字
const [ownerList, setOwnerList] = useState([])
// 获取所属者表格储存至redux 更新表格 (已弃用)
// 获取有项目所属者表格
const getProjOwnerList = (page: number, keywords: string) => {
get({
messageApi,
url: `/api/proj-owner/list/self`,
onBefore() {
url: `/api/proj-owner/listpage/self`,
// 参数
config: {
params: {
page: page,
rows: 10,
keywords: keywords
}
},
onSuccess(data: any) {
onBefore() {
setLoading(true)
},
onSuccess({ data }: any) {
// console.log('所属者表格', data.data);
// setBelongPeopleArray(data.data)
// 存redux的belongArray
dispath({
type: 'uparray',
val: data.data
})
// dispath({
// type: 'uparray',
// val: data.data
// })
setOwnerList(data.rows)
// setOwnerList([])
setOwnerToatl(data.total)
// console.log(data);
},
onFinally() {
setLoading(false)
}
})
}
// 表格被选的项
const [selectedRowKeys, setselectedRowKeys] = useState<string[]>([])
// 更新数据
// const upBelongArray = () => {
@ -211,7 +289,11 @@ export default function Index() {
const [chargeAdditionals, setchargeAdditionals] = useState<string | null>(null)
const [tagDataId, settagDataId] = useState<string | null>(null)
const [payStatus, setpayStatus] = useState<string | null>(null)
const [authorId, setauthorId] = useState<string | null>(null)
const [nowauthorId, setNowauthorId] = useState('') //临时id
const [authorId, setauthorId] = useState<string>('') //所属者id
const [nowauthorName, setNowauthorName] = useState<string>('') //临时名称
const [authorName, setauthorName] = useState<string>('') //所属者名称
const [projRemindId, setprojRemindId] = useState<string | null>(null)
//退款状态
const [applyStatus, setapplyStatus] = useState<string | null>(null)
@ -233,25 +315,25 @@ export default function Index() {
// const indexListContext = useContext(IndexListContext);
// 所属者信息
// const [belongPeopleArray, setBelongPeopleArray] = useState<any[]>([])
const [currentPage, setCurrentPage] = useState(1);
const itemsPerPage = 5;
// const [currentPage, setCurrentPage] = useState(1);
// const itemsPerPage = 5;
// 计算总页数
const totalItems = belongArray.length;
const totalPages = Math.ceil(totalItems / itemsPerPage);
// const totalItems = belongArray.length;
// const totalPages = Math.ceil(totalItems / itemsPerPage);
// 计算当前页数据的起始和结束索引
const startIndex = (currentPage - 1) * itemsPerPage;
const endIndex = Math.min(startIndex + itemsPerPage, totalItems);
// const startIndex = (currentPage - 1) * itemsPerPage;
// const endIndex = Math.min(startIndex + itemsPerPage, totalItems);
// 提取当前页的数据
const currentPageData = belongArray.slice(startIndex, endIndex);
// const currentPageData = belongArray.slice(startIndex, endIndex);
// 处理页码切换
const handlePageChange = (page: number) => {
if (page >= 1 && page <= totalPages) {
setCurrentPage(page);
}
};
// const handlePageChange = (page: number) => {
// if (page >= 1 && page <= totalPages) {
// setCurrentPage(page);
// }
// };
const nav = useNavigate();
// // home页初始化搜索条件
const init = () => {
@ -263,15 +345,22 @@ export default function Index() {
setpayStatus(null)
setprojRemindId(null)
nav('/home')
setauthorId(null)
setauthorId('')
setauthorName('')
setNowauthorId('')
setNowauthorName('')
setselectedRowKeys([]);
}
// 退款页初搜索条件始化
const refunInit = () => {
setnewRefunValue('')
setrefunKeywords('')
setapplyStatus(null)
setauthorId(null)
setauthorId('')
setauthorName('')
setNowauthorId('')
setNowauthorName('')
setselectedRowKeys([]);
// 刷新当前页面
}
@ -283,7 +372,11 @@ export default function Index() {
setcorrectionType(null)
setcorrectionApplyStatus(null)
setTagCor(null)
setauthorId(null)
setauthorId('')
setauthorName('')
setNowauthorId('')
setNowauthorName('')
setselectedRowKeys([]);
}
@ -343,6 +436,8 @@ export default function Index() {
],
handleListItem(_e, _index, item: IMenuListItem) {
// setauthorId('')
// setauthorName('')
projMenu.list.forEach(item => item.active = false);
sellMenu.list.forEach(item => item.active = false);
buyMenu.list.forEach(item => item.active = false);
@ -885,12 +980,12 @@ export default function Index() {
})
}
getProjOwnerList()
// getProjOwnerList()
getCorTag()
getTag()
getremindTag()
console.log(belongArray);
// console.log(belongArray);
}, []);
useEffect(() => {
if (location.pathname.includes('/home')) {
@ -1082,7 +1177,7 @@ export default function Index() {
// enableBelongpeople = {()=>{setClickBelongpeople(true)}}
/>
<div className='belongPeopleMenu'>
{/* <div className='belongPeopleMenu'>
<div className='belongPeopleMenu-title'>
<MenuFoldOutlined style={{ marginLeft: 10, marginRight: 10 }} />
</div>
@ -1092,78 +1187,17 @@ export default function Index() {
currentPageData.map((item: any) => {
return (
<div className='belongpeopleName' key={item.projOwnerId} onClick={() => {
// const isHome = getMenuActive() == 'ALL' || getMenuActive() == 'PROCESSING' || getMenuActive() == 'COMPLETE'
if (authorId == item.projOwnerId) {
setauthorId(null)
// if (isHome) {
// nav('/home', {
// state: {
// keyword: keywords,
// type: type,
// chargeAdditionals: chargeAdditionals,
// tagDataId: tagDataId,
// authorId: '',
// payStatus: payStatus
// }
// })
// }
// if (getMenuActive() == 'REFUN') {
// nav('/refun', {
// state: {
// state: {
// keywords: refunKeywords,
// applyStatus: applyStatus,
// authorId: '',
// }
// }
// })
// }
} else {
setauthorId(item.projOwnerId)
// if (isHome) {
// nav('/home', {
// state: {
// keyword: keywords,
// type: type,
// chargeAdditionals: chargeAdditionals,
// tagDataId: tagDataId,
// authorId: item.projOwnerId,
// payStatus: payStatus
// }
// })
// }
// if (getMenuActive() == 'REFUN') {
// nav('/refun', {
// state: {
// state: {
// keywords: refunKeywords,
// applyStatus: applyStatus,
// authorId: item.projOwnerId,
// }
// }
// })
// }
}
// alert(getMenuActive())
// const menuName = (getMenuActive())
// // const menuTrue = menuName == 'ALL' || 'PROCESSING' || 'COMPLETE'
// if(menuName == 'ALL' || 'PROCESSING' ||'COMPLETE' ){
// alert(1)
// }else{
// alert(2)
// }
}}
style={{ background: authorId == item.projOwnerId ? '#FF9F08' : '', color: authorId == item.projOwnerId ? '#FFF' : '' }}
title={item.name} // 添加 title 属性以显示完整文本
@ -1174,25 +1208,7 @@ export default function Index() {
})
}
</div>
{/* 分页控件 */}
{/* <div className='pagination-controls'>
<Button
type="primary"
onClick={() => handlePageChange(currentPage - 1)}
disabled={currentPage === 1}
>
</Button>
<Button
type="primary"
onClick={() => handlePageChange(currentPage + 1)}
disabled={currentPage === totalPages}
style={{ marginLeft: 10 }}
>
</Button>
</div> */}
<div className='belong-pagination'>
<Pagination
showSizeChanger={false}
@ -1211,7 +1227,7 @@ export default function Index() {
/>
</div>
</div>
</div>
</div> */}
{/* <MenuTreeWithTopButton /> */}
{/* <MenuWithBottomButtom
button={agentMenu.button}
@ -1469,7 +1485,7 @@ export default function Index() {
placeholder={'选择付款类型'}
/>
<Select
{/* <Select
allowClear
value={authorId}
@ -1493,7 +1509,94 @@ export default function Index() {
options={belongArrayList}
placeholder={'选择所属者'}
/>
/> */}
<div style={{
position: 'relative',
}}>
<Input placeholder='选择所属者'
value={authorName}
style={{
height: '31px', width: '110px', marginLeft: 5, display: showSearchBox ? 'block' : 'none',
paddingRight: 20,
// 超出部分用...显示
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
}}></Input>
<div
title={authorName}
style={{
position: 'absolute',
height: '31px', width: '110px',
// background: 'skyblue',
top: 0,
left: 5,
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
paddingRight: 10,
boxSizing: 'border-box',
}}
onClick={() => {
// setauthorName('哈哈哈哈哈哈哈哈哈哈嘎嘎嘎嘎嘎嘎')
setOwnerPage(1)
getProjOwnerList(1, '')
setSelectBelongPeople(true)
// nav('/home', {
// state: {
// keyword: keywords,
// type: type,
// chargeAdditionals: chargeAdditionals,
// tagDataId: tagDataId,
// authorId: '1',
// payStatus: payStatus,
// projRemindId: projRemindId,
// // tagNot
// }
// })
}}
>
</div>
<CloseCircleOutlined
className='clearIcon'
style={{
top: 8,
right: 5,
position: 'absolute',
color: '#FFF',
// background: '#868686',
borderRadius: '50%',
fontSize: 14,
display: authorName ? 'unset' : 'none',
marginTop: 1,
}}
title=''
onClick={() => {
setauthorName('')
setauthorId('')
setNowauthorId('')
setNowauthorName('')
setselectedRowKeys([]);
nav('/home', {
state: {
keyword: keywords,
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: '',
payStatus: payStatus,
projRemindId: projRemindId,
// tagNot
}
})
}}
/>
</div>
<Button onClick={() => {
init()
}} style={{ marginLeft: 5, display: showSearchBox ? 'block' : 'none', height: 31 }}
@ -1563,7 +1666,7 @@ export default function Index() {
placeholder={'选择状态'}
allowClear
/>
<Select
{/* <Select
allowClear
value={authorId}
@ -1583,8 +1686,90 @@ export default function Index() {
options={belongArrayList}
placeholder={'选择所属者'}
/>
/> */}
<div style={{
position: 'relative',
}}>
<Input placeholder='选择所属者'
value={authorName}
style={{
height: '31px', width: '110px', marginLeft: 5,
paddingRight: 20,
// 超出部分用...显示
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
}}></Input>
<div
title={authorName}
style={{
position: 'absolute',
height: '31px', width: '110px',
// background: 'skyblue',
top: 0,
left: 5,
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
paddingRight: 10,
boxSizing: 'border-box',
}}
onClick={() => {
// setauthorName('哈哈哈哈哈哈哈哈哈哈嘎嘎嘎嘎嘎嘎')
setOwnerPage(1)
getProjOwnerList(1, '')
setSelectBelongPeople(true)
// nav('/home', {
// state: {
// keyword: keywords,
// type: type,
// chargeAdditionals: chargeAdditionals,
// tagDataId: tagDataId,
// authorId: '1',
// payStatus: payStatus,
// projRemindId: projRemindId,
// // tagNot
// }
// })
}}
>
</div>
<CloseCircleOutlined
className='clearIcon'
style={{
top: 8,
right: 5,
position: 'absolute',
color: '#FFF',
// background: '#868686',
borderRadius: '50%',
fontSize: 14,
display: authorName ? 'unset' : 'none',
marginTop: 1,
}}
title=''
onClick={() => {
setauthorName('')
setauthorId('')
setNowauthorId('')
setNowauthorName('')
setselectedRowKeys([]);
nav('/refun', {
state: {
keywords: refunKeywords,
applyStatus: applyStatus,
authorId: '',
}
})
}}
/>
</div>
<Button onClick={() => {
refunInit()
}} style={{ marginLeft: 5, height: 31 }}
@ -1735,7 +1920,7 @@ export default function Index() {
placeholder={'选择标签'}
allowClear
/>
<Select
{/* <Select
allowClear
value={authorId}
@ -1758,8 +1943,93 @@ export default function Index() {
options={belongArrayList}
placeholder={'选择所属者'}
/>
/> */}
<div style={{
position: 'relative',
}}>
<Input placeholder='选择所属者'
value={authorName}
style={{
height: '31px', width: '110px', marginLeft: 5,
paddingRight: 20,
// 超出部分用...显示
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
}}></Input>
<div
title={authorName}
style={{
position: 'absolute',
height: '31px', width: '110px',
// background: 'skyblue',
top: 0,
left: 5,
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
paddingRight: 10,
boxSizing: 'border-box',
}}
onClick={() => {
// setauthorName('哈哈哈哈哈哈哈哈哈哈嘎嘎嘎嘎嘎嘎')
setOwnerPage(1)
getProjOwnerList(1, '')
setSelectBelongPeople(true)
// nav('/home', {
// state: {
// keyword: keywords,
// type: type,
// chargeAdditionals: chargeAdditionals,
// tagDataId: tagDataId,
// authorId: '1',
// payStatus: payStatus,
// projRemindId: projRemindId,
// // tagNot
// }
// })
}}
>
</div>
<CloseCircleOutlined
className='clearIcon'
style={{
top: 8,
right: 5,
position: 'absolute',
color: '#FFF',
// background: '#868686',
borderRadius: '50%',
fontSize: 14,
display: authorName ? 'unset' : 'none',
marginTop: 1,
}}
title=''
onClick={() => {
setauthorName('')
setauthorId('')
setNowauthorId('')
setNowauthorName('')
setselectedRowKeys([]);
nav('/correction', {
state: {
keywords: correctionKeywords,
correctionNumType: correctionNumType,
correctionType: correctionType,
applyStatus: applyStatus,
authorId: '',
tagCor: tagCor,
}
})
}}
/>
</div>
<Button onClick={() => {
correctionInit()
}} style={{ marginLeft: 5, height: 31 }}
@ -2042,6 +2312,129 @@ export default function Index() {
})}
</div>
</Modal>
<Modal
title="选择所属者"
destroyOnClose={true}
open={selectBelongPeople}
footer={null}
onCancel={() => {
setSelectBelongPeople(false)
}}
width={1000}
maskClosable={false} // 禁止通过点击蒙层关闭
centered
>
<Spin tip="加载中..." size="small" spinning={loading}>
<div>
<Search
allowClear
placeholder='请输入关键字' value={ownerKeyWords}
onSearch={(value) => {
setOwnerKeyWords(value)
getProjOwnerList(1, value)
}}
style={{
width: '200px',
height: '31px',
marginBottom: 10
}}
onChange={
(e) => {
setOwnerKeyWords(e.target.value)
if (e.target.value == '') {
setOwnerKeyWords('')
setOwnerPage(1)
getProjOwnerList(1, '')
}
}
}
></Search>
</div>
<Table
rowSelection={{
selectedRowKeys: selectedRowKeys,
type: 'radio',
// ...rowSelection,
onChange: (_selectedRowKeys: React.Key[], selectedRows: DataType[]) => {
// console.log('selectedRows: ', selectedRows);
setselectedRowKeys([selectedRows[0].projOwnerId])
// setnewProjId(selectedRows[0].projId)
// setnewprojName(selectedRows[0].projName)
setNowauthorId(selectedRows[0].projOwnerId)
setNowauthorName(selectedRows[0].name)
},
}}
columns={columns}
dataSource={ownerList}
rowKey={'projOwnerId'}
pagination={
{
pageSize: 10,
total: ownerTotal,
onChange: (currentPage) => {
setOwnerPage(currentPage);
getProjOwnerList(currentPage, ownerKeyWords)
},
showSizeChanger: false,
current: ownerPage
}
}
locale={{
emptyText:
<Empty
description="暂无数据"
/>,
}}
// scroll={{ y: 500 }}
onRow={(record: DataType) => {
return {
onClick: (event: React.MouseEvent<HTMLTableRowElement>) => {
// 阻止默认的行点击事件,以避免选中行时触发其他操作
event.stopPropagation();
// 更新选中的行
setselectedRowKeys([record.projOwnerId]);
// setnewProjId(record.projId);
// setnewprojName(record.projName);
setNowauthorId(record.projOwnerId)
setNowauthorName(record.name)
},
style: { cursor: 'pointer' },
};
}}
/>
<div style={{
display: 'flex',
justifyContent: 'flex-end'
}}>
<div>
<Button
onClick={() => {
setSelectBelongPeople(false)
// setselectedRowKeys([]);
}}
></Button>
<Button style={{ marginLeft: 10 }} type="primary"
onClick={() => {
if (nowauthorId) {
setauthorId(nowauthorId)
setauthorName(nowauthorName)
setSelectBelongPeople(false)
// setselectedRowKeys([]);
} else {
messageApi.error('请选择所属者')
}
}}
></Button>
</div>
</div>
</Spin>
</Modal>
<div className='couponMask-box'
style={{ display: coupon && (location.pathname == '/' || location.pathname.includes('/home')) && couponArray.length == 1 ? 'unset' : 'none' }}
>

View File

@ -1,3 +1,9 @@
.clearIcon{
background-color:#c7c7c7 ;
}
.clearIcon:hover{
background-color:#868686 ;
}
@media (min-width: 1671px) {
.mediaBox{
height: 15px;
@ -812,3 +818,6 @@
display: inline-block;
}
}

View File

@ -625,12 +625,14 @@ export default function ProjNew() {
// position: 'relative',
// background: 'pink',
}}>
<span style={{ color: 'red' }}>*</span>
</div>
<Form.Item<ProjInfo>
name="belongPeople"
rules={[{ required: true, message: '请选择/创建知识产权所属者' }]}
rules={[
// { required: true, message: '请选择/创建知识产权所属者' }
]}
>
<Input style={{ background: '#eeeeee', width: '310px', height: '42px', color: '#3B3B3B' }} placeholder="请选择/创建知识产权所属者" disabled />

View File

@ -156,12 +156,12 @@ export default function ProjEditStep2(props: any) {
const [selectedContantRowKeys, setSelectedContantRowKeys] = useState<React.Key[]>([]);
// 联系人表格选择触发
const ContantRowSelection = {
selectedRowKeys:selectedContantRowKeys,
selectedRowKeys: selectedContantRowKeys,
// selectedRowKeys: React.Key[]
onChange: (selectedRowKeys: React.Key[], selectedRows: ContactDataType[]) => {
setSelectedContantRowKeys(selectedRowKeys);
// console.log(selectedRowKeys);
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
if (selectedRows.length > 0) {
setApplyConcatId(selectedRows[0].projContactId)
@ -631,14 +631,14 @@ export default function ProjEditStep2(props: any) {
<Form.Item<FieldType>
// label="开发完成时间"
name="projDevCompleteDate"
// rules={[{ required: true, message: '请输入开发完成时间' }]}
// rules={[{ required: true, message: '请输入开发完成时间' }]}
>
<DatePicker placeholder="请选择开发完成日期"
format={dateFormat}
locale={locale}
// style={{ width: '100%' }}
style={{ height: '50px', width: '411px', fontSize: '16px' }}
disabledDate={(current) => current && current > dayjs().endOf('day')}
disabledDate={(current) => current && current > dayjs().endOf('day')}
/>
</Form.Item>
@ -777,7 +777,7 @@ export default function ProjEditStep2(props: any) {
belongRowSelection.onChange([record.projOwnerId], [record]);
}
},
style: { cursor: 'pointer' }
style: { cursor: 'pointer' }
};
}}
>
@ -829,7 +829,7 @@ export default function ProjEditStep2(props: any) {
<Column
title="操作"
align="center"
className="ant-table-cell-action"
className="ant-table-cell-action"
render={(_text, record: any) => (
<Space size="middle">
<a onClick={() => {
@ -972,10 +972,10 @@ export default function ProjEditStep2(props: any) {
ContantRowSelection.onChange([record.projContactId], [record]);
}
},
style: { cursor: 'pointer' }
style: { cursor: 'pointer' }
};
}}
dataSource={tableContactData}
pagination={{
@ -1011,7 +1011,7 @@ export default function ProjEditStep2(props: any) {
</div>
)}
/>
<Column title="所属公司" align="center" dataIndex="company"
<Column title="所属公司" align="center" dataIndex="company"
render={(text, record: any) => (
<div style={{ cursor: 'pointer' }} onClick={() => {
handleContantRowClick(record)
@ -1024,7 +1024,7 @@ export default function ProjEditStep2(props: any) {
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
<Column
title="操作"
className="ant-table-cell-action"
className="ant-table-cell-action"
align="center"
render={(_text, record: any) => (
<Space size="middle">
@ -1129,20 +1129,22 @@ export default function ProjEditStep2(props: any) {
{/* 总体选择保存的提示 */}
<Modal title="提示"
centered
okText="确定"
cancelText="取消"
open={isEditModalOpen}
onOk={() => {
// 美哟u创建所属者 应该还得判断一下没选中所属者
if (authorName == '') {
// alert('所属者不能为空')
messageApi.open({
type: 'error',
content: '请选择所属者'
})
setIsEditModalOpen(false);
// 没有申请人 应该还得判断一下没选中申请人
} else if (applyContactName == '') {
// if (authorName == '') {
// // alert('所属者不能为空')
// messageApi.open({
// type: 'error',
// content: '请选择所属者'
// })
// setIsEditModalOpen(false);
// // 没有申请人 应该还得判断一下没选中申请人
// } else
if (applyContactName == '') {
// alert('申请人不能为空')
messageApi.open({
type: 'error',
@ -1167,7 +1169,7 @@ export default function ProjEditStep2(props: any) {
body: {
projSubName: formInfo.getFieldValue('projSubName'),
projVersion: formInfo.getFieldValue('projVersion'),
projDevCompleteDate: formInfo.getFieldValue('projDevCompleteDate')?dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat):'',
projDevCompleteDate: formInfo.getFieldValue('projDevCompleteDate') ? dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat) : '',
// companyName: formInfo.getFieldValue('companyName'),
// companyNameEn: formInfo.getFieldValue('companyNameEn'),
authorName,