添加所属公司字段

This commit is contained in:
xixi 2024-06-03 14:56:19 +08:00
parent 81b4d1a21b
commit e0b6d38454
7 changed files with 111 additions and 70 deletions

View File

@ -68,7 +68,7 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
>
{props.button.name}
</button> */}
<ul>{list}</ul>
<ul style={{}}>{list}</ul>
</div>
)
}

View File

@ -63,7 +63,7 @@
.menu-with-bot-button ul {
padding-top: 12px;
padding-bottom: 12px;
width: 231px;
width: 230px;
}
.menu-with-bot-button ul li {

View File

@ -50,7 +50,7 @@
.menu-with-top-button ul {
padding-top: 12px;
padding-bottom: 12px;
width: 231px;
width: 230px;
/* background-color:pink; */
}

View File

@ -20,4 +20,5 @@ interface ContactDataType {
phone: string
projContactId: string
email:string
company:string
}

View File

@ -205,7 +205,7 @@ export default function Index() {
setNow('创建项目')
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: '创建项目' }])
// /config-mod-list /config-menu-list /config-mod-show
} else if (location.pathname.includes('/proj-edit')&& !location.pathname.includes('/config-mod-show')&& !location.pathname.includes('/config-mod-edit') && !location.pathname.includes('/step') && !location.pathname.includes('/config-loginpage')&& !location.pathname.includes('/config-mod-save')&& !location.pathname.includes('/config-mod-list')&& !location.pathname.includes('/config-menu-list')) {
} else if (location.pathname.includes('/proj-edit') && !location.pathname.includes('/config-mod-show') && !location.pathname.includes('/config-mod-edit') && !location.pathname.includes('/step') && !location.pathname.includes('/config-loginpage') && !location.pathname.includes('/config-mod-save') && !location.pathname.includes('/config-mod-list') && !location.pathname.includes('/config-menu-list')) {
setNow('编辑项目')
// setEditname(location.pathname)
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: '编辑项目' }])
@ -233,33 +233,33 @@ export default function Index() {
setNow('登录界面设置')
// setNewname(location.pathname)
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: <a onClick={() => { nav(-1) }}></a> }, { title: '登录界面设置' }])
}else if (location.pathname.includes('/proj-edit/config-mod-list')) {
} else if (location.pathname.includes('/proj-edit/config-mod-list')) {
setNow('系统菜单管理')
// setNewname(location.pathname)
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: <a onClick={() => { nav(-1) }}></a> }, { title: '系统菜单管理' }])
}else if (location.pathname.includes('/proj-edit/config-menu-list')) {
} else if (location.pathname.includes('/proj-edit/config-menu-list')) {
setNow('系统菜单顺序')
// setNewname(location.pathname)
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: <a onClick={() => { nav(-1) }}></a> }, { title: '系统菜单顺序' }])
}else if (location.pathname.includes('/step3')) {
} else if (location.pathname.includes('/step3')) {
setNow('软件功能特点')
// setNewname(location.pathname)
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: <a onClick={() => { nav(-1) }}></a> }, { title: '软件功能特点' }])
}else if (location.pathname.includes('/proj-edit/config-mod-save')) {
} else if (location.pathname.includes('/proj-edit/config-mod-save')) {
setNow('添加菜单')
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: <a onClick={() => { nav(-1) }}></a> }, { title: '添加菜单' }])
}else if (location.pathname.includes('/proj-edit/config-mod-edit')) {
} else if (location.pathname.includes('/proj-edit/config-mod-edit')) {
setNow('编辑菜单')
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: <a onClick={() => { nav(-2) }}></a> },{ title: <a onClick={() => { nav(-1) }}></a> }, { title: '编辑菜单' }])
// /config-mod-edit /config-mod-show
}else if (location.pathname.includes('/proj-edit/config-mod-show')) {
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: <a onClick={() => { nav(-2) }}></a> }, { title: <a onClick={() => { nav(-1) }}></a> }, { title: '编辑菜单' }])
// /config-mod-edit /config-mod-show
} else if (location.pathname.includes('/proj-edit/config-mod-show')) {
setNow('查看菜单')
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: <a onClick={() => { nav(-2) }}></a> },{ title: <a onClick={() => { nav(-1) }}></a> }, { title: '查看菜单' }])
// /config-mod-edit
}else if (location.pathname.includes('/product-release')) {
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: <a onClick={() => { nav(-2) }}></a> }, { title: <a onClick={() => { nav(-1) }}></a> }, { title: '查看菜单' }])
// /config-mod-edit
} else if (location.pathname.includes('/product-release')) {
setNow('首页')
setPathArray([{ title: '首页' }])
// /config-mod-edit /product-release
// /config-mod-edit /product-release
}
}, [location.pathname])
useEffect(() => {
@ -300,29 +300,31 @@ export default function Index() {
<IndexListContext.Provider value={listData} >
<IndexListDispatchContext.Provider value={dispatch}>
<div className="index">
<div className="left">
<div style={{ height: '15px', width: '230px', background: 'white' }}></div>
<MenuWithTopButton
button={projMenu.button}
list={projMenu.list}
handleListItem={projMenu.handleListItem}
/>
<MenuTreeWithTopButton />
{/* <MenuWithBottomButtom
<div className='leftbox'>
<div className="left" >
<div style={{ height: '15px', width: '230px', background: 'white' }}></div>
<MenuWithTopButton
button={projMenu.button}
list={projMenu.list}
handleListItem={projMenu.handleListItem}
/>
<MenuTreeWithTopButton />
{/* <MenuWithBottomButtom
button={agentMenu.button}
list={agentMenu.list}
handleListItem={agentMenu.handleListItem}
/> */}
{/* <MenuWithBottomButtom
button={sellMenu.button}
list={sellMenu.list}
handleListItem={sellMenu.handleListItem}
/>
<MenuWithBottomButtom
button={buyMenu.button}
list={buyMenu.list}
handleListItem={buyMenu.handleListItem}
/> */}
{/* <MenuWithBottomButtom
button={sellMenu.button}
list={sellMenu.list}
handleListItem={sellMenu.handleListItem}
/>
<MenuWithBottomButtom
button={buyMenu.button}
list={buyMenu.list}
handleListItem={buyMenu.handleListItem}
/> */}
</div>
</div>
<div className="right">
<div>

View File

@ -2,17 +2,28 @@
/* position: relative; */
height: 100vh;
/* margin-top: 74px; */
display: flex;
}
.index .left {
.leftbox{
width: 250px;
height: calc(100vh - 65px);
/* background-color: red; */
position: fixed;
/* width: 267px; */
width: 230px;
height: 100%;
/* overflow: auto; */
top: 65px;
left: 0;
overflow: auto;
}
.index .left {
/* position: fixed; */
/* width: 267px; */
width: 230px;
min-height: calc(100vh - 65px);
/* overflow: auto; */
/* top: 65px; */
/* left: 0; */
background-color: var(--color-light);
}
.index .right {

View File

@ -1,5 +1,5 @@
import './proj-edit-step.css';
import { Radio, Cascader, Col, DatePicker, Flex, message, Modal, Row, Spin, Select, Table, Space } from "antd";
import { Radio, Cascader, Col, DatePicker, Flex, message, Modal, Row, Spin, Table, Space, Select } from "antd";
import { FolderAddOutlined } from '@ant-design/icons';
import locale from 'antd/es/date-picker/locale/zh_CN';
import { useParams } from "react-router-dom";
@ -21,7 +21,7 @@ type FieldType = {
projDevCompleteDate: Dayjs;
companyName: string;
companyNameEn: string;
projName:string
projName: string
};
// 所属人信息类型
type BelongPeopleType = {
@ -45,6 +45,7 @@ type ContactType = {
phone: string
projContactId: string
email: string
company: string
}
// interface DataType {
// key: React.Key;
@ -93,6 +94,7 @@ export default function ProjEditStep2(props: any) {
const [applyContactEmail, setapplyContactEmail] = useState('') //联系人邮箱
const [applyContactName, setapplyContactName] = useState('') //联系人姓名
const [applyContactPhone, setapplyContactPhone] = useState('') //联系人手机
const [applyContactCompany,setapplyContactCompany] = useState('')
// 设置所属者more你选中的行
// const [selectedRowKeys, setSelectedRowKeys] = useState<BelongDataType[]>([]);
@ -146,7 +148,7 @@ export default function ProjEditStep2(props: any) {
setapplyContactEmail(selectedRows[0].email)
setapplyContactName(selectedRows[0].name)
setapplyContactPhone(selectedRows[0].phone)
setapplyContactCompany(selectedRows[0].company)
},
};
@ -257,13 +259,14 @@ export default function ProjEditStep2(props: any) {
setApplyConcatId(data.applyContactId)
setapplyContactName(data.applyContactName)
setapplyContactPhone(data.applyContactPhone)
// setapplyContactCompany(data.applyContactCompany)
setapplyContactCsaNo(data.applyContactCsaNo)
setapplyContactEmail(data.applyContactEmail)
console.log('基本信息', data);
setAuthorId(data.authorId)
setApplyConcatId(data.applyContactId)
formInfo.setFieldsValue({
projName : data.projName,
projName: data.projName,
projSubName: data.projSubName,
projVersion: data.projVersion,
projDevCompleteDate: data.projDevCompleteDate ? dayjs(data.projDevCompleteDate, 'YYYY-MM-DD') : '',
@ -426,6 +429,7 @@ export default function ProjEditStep2(props: any) {
name: formContact.getFieldValue('name'),
phone: formContact.getFieldValue('phone'),
email: formContact.getFieldValue('email'),
company: formContact.getFieldValue('company')
},
onBefore() {
@ -449,7 +453,7 @@ export default function ProjEditStep2(props: any) {
name: formContact.getFieldValue('name'),
phone: formContact.getFieldValue('phone'),
email: formContact.getFieldValue('email'),
company: formContact.getFieldValue('company')
},
onBefore() {
},
@ -472,8 +476,8 @@ export default function ProjEditStep2(props: any) {
// console.log(data.target.value);
setBelongShow(data.target.value)
}
const [CrcAccountShow,setCrcAccountShow] = useState('0')
const isCrcAccountChange = (data:any) => {
const [CrcAccountShow, setCrcAccountShow] = useState('0')
const isCrcAccountChange = (data: any) => {
// console.log(data.target.value);
setCrcAccountShow(data.target.value)
}
@ -637,7 +641,7 @@ export default function ProjEditStep2(props: any) {
<div style={{ padding: '22px 15px' }}>
<div style={{ padding: '14px 19px', background: '#F3F3F3', color: '#A3A3A3', fontSize: '14px' }}>
<a onClick={()=>{
<a onClick={() => {
window.open('https://www.aimzhu.com/Rnsystem.html')
}} style={{ color: '#FDB33E' }}></a>
</div>
@ -651,12 +655,12 @@ export default function ProjEditStep2(props: any) {
setIsNewBelongOpen(true)
setbelongTitle('创建所属者')
formBelong.setFieldsValue({
// 是否提供平台账号
isCrcAccount: '0',
// 个人/企业
authorType: 'ORGANIZATION',
})
}} type="primary" icon={<FolderAddOutlined style={{ fontSize: '18px' }} />} style={{ width: "160px", height: '43px', fontSize: '14px' }}>
@ -745,7 +749,7 @@ export default function ProjEditStep2(props: any) {
render={(text, record: any) => (
<Space size="middle">
<a onClick={() => {
// alert(record.projOwnerId);
console.log('text:', text);
@ -858,7 +862,7 @@ export default function ProjEditStep2(props: any) {
<div style={{ marginRight: '22px' }}>:</div>
<div style={{ display: applyContactName == '' ? 'block' : 'none' }}></div>
<div style={{ display: applyContactName == '' ? 'none' : 'block' }}>
{applyContactName}/{applyContactPhone}/{applyContactEmail}
{applyContactName}/{applyContactPhone}{applyContactEmail?'/'+applyContactEmail:''}
</div>
</div>
<div className='belongPeople-bot'>
@ -880,6 +884,9 @@ export default function ProjEditStep2(props: any) {
<Column title="联系人" dataIndex="name" />
<Column title="联系人手机号" dataIndex="phone" />
<Column title="平台专属客服" dataIndex="csaNo" />
<Column title="所属公司" dataIndex="company"
render={(text) => (text !== '' ? text : '一')}
/>
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
<Column
@ -900,7 +907,8 @@ export default function ProjEditStep2(props: any) {
csaNo: record.csaNo,
name: record.name,
phone: record.phone,
email: record.email
email: record.email,
company: record.company
})
}}> </a>
<span style={{ color: '#3472EE' }}>|</span>
@ -959,7 +967,7 @@ export default function ProjEditStep2(props: any) {
// 如果验证通过,则执行确认操作
// 这里可以放置你的确认操作逻辑
setIsEditModalOpen(true)
}).catch(() => {
// 如果验证不通过,可以根据需要处理错误信息
@ -1041,7 +1049,8 @@ export default function ProjEditStep2(props: any) {
applyContactCsaNo,
applyContactEmail,
applyContactName,
applyContactPhone
applyContactPhone,
applyContactCompany
},
onBefore() {
@ -1088,9 +1097,9 @@ export default function ProjEditStep2(props: any) {
}
width={1280}
// 确认按钮样式
okButtonProps={{size:'large', style: { display: belongTitle == '查看所属者' ? 'none' : 'block' } }}
okButtonProps={{ size: 'large', style: { display: belongTitle == '查看所属者' ? 'none' : 'block' } }}
// 返回按钮样式
cancelButtonProps={{ size:'large' }}
cancelButtonProps={{ size: 'large' }}
onCancel={() => {
setIsNewBelongOpen(false)
// setBelongShow('')
@ -1131,7 +1140,7 @@ export default function ProjEditStep2(props: any) {
>
<Radio.Group
// value={null}
value={"ORGANIZATION"}
value={"ORGANIZATION"}
onChange={typeChange}
disabled={belongTitle == '查看所属者' ? true : false}>
<Radio value="ORGANIZATION" > / </Radio>
@ -1318,7 +1327,7 @@ export default function ProjEditStep2(props: any) {
</Row>
<Row gutter={15}>
<Col span={12}>
<div style={{display:CrcAccountShow=='0'?'none':'block'}}>
<div style={{ display: CrcAccountShow == '0' ? 'none' : 'block' }}>
<div className='crcAccount'></div>
<Form.Item<BelongPeopleType>
// label="中国版权登记业务平台用户名"
@ -1346,7 +1355,7 @@ export default function ProjEditStep2(props: any) {
</div>
</Col>
<Col span={12}>
<div style={{display:CrcAccountShow=='0'?'none':'block'}}>
<div style={{ display: CrcAccountShow == '0' ? 'none' : 'block' }}>
<div className='crcAccount'></div>
<Form.Item<BelongPeopleType>
// label="中国版权登记业务平台密码"
@ -1394,9 +1403,9 @@ export default function ProjEditStep2(props: any) {
}
width={745}
// 确认按钮样式
okButtonProps={{ style: { width: '102px', height: '49px', background: '#FFBA00', fontSize: '18px', color: '#FFFFFF', display: contactTitle == '查看联系人' ? 'none' : 'block' } }}
okButtonProps={{ size: 'large', style: { display: contactTitle == '查看联系人' ? 'none' : 'block' } }}
// 返回按钮样式
cancelButtonProps={{ style: { border: 'none', width: '102px', height: '49px', background: '#F3F3F3', fontSize: '18px', color: '#8C8C8C' } }}
cancelButtonProps={{ size: 'large', style: {} }}
onCancel={() => {
steIsContantOpen(false)
@ -1421,7 +1430,7 @@ export default function ProjEditStep2(props: any) {
autoComplete="off"
>
<div className='blongNameInt'>
<div className='blongTitle '>: </div>
<div className='blongTitle ' style={{ width: 65, marginRight: '15px' }}>: </div>
<Form.Item<ContactType>
@ -1429,37 +1438,52 @@ export default function ProjEditStep2(props: any) {
rules={[{ required: true, message: '请输入姓名' }]}
>
<Input placeholder="请输入姓名"
style={{ height: '44px', width: '384px', fontSize: '15px', marginTop: '22px', marginLeft: '15px' }}
style={{ height: '44px', width: '384px', fontSize: '15px', marginTop: '22px' }}
disabled={contactTitle == '查看联系人' ? true : false}
/>
</Form.Item>
</div>
<div className='blongNameInt'>
<div className='blongTitle '>: </div>
<div className='blongTitle ' style={{ width: 65 , marginRight: '15px'}}>: </div>
<Form.Item<ContactType>
name="phone"
rules={[{ required: true, message: '请输入电话号码' }]}
>
<Input placeholder="请输入电话号码"
style={{ height: '44px', width: '384px', fontSize: '15px', marginTop: '22px', marginLeft: '15px' }}
style={{ height: '44px', width: '384px', fontSize: '15px', marginTop: '22px' }}
disabled={contactTitle == '查看联系人' ? true : false}
/>
</Form.Item>
</div>
<div className='blongNameInt'>
<div className='blongTitle '>: </div>
<div className='blongTitle ' style={{ width: 65, marginRight: '15px' }}>: </div>
<Form.Item<ContactType>
name="company"
rules={[{ required: false, message: '请输入所属公司' }]}
>
<Input placeholder="请输入所属公司"
style={{ height: '44px', width: '384px', fontSize: '15px', marginTop: '22px' }}
disabled={contactTitle == '查看联系人' ? true : false}
/>
</Form.Item>
</div>
<div className='blongNameInt'>
<div className='blongTitle ' style={{ width: 65, marginRight: '15px' }}>: </div>
<Form.Item<ContactType>
name="email"
rules={[{ required: true, message: '请输入邮箱' },
rules={[{ required: false, message: '请输入邮箱' },
{ type: 'email', message: '请输入有效的邮箱地址' }
]}
>
<Input placeholder="请输入邮箱"
style={{ height: '44px', width: '384px', fontSize: '15px', marginTop: '22px', marginLeft: '15px' }}
style={{ height: '44px', width: '384px', fontSize: '15px', marginTop: '22px'}}
disabled={contactTitle == '查看联系人' ? true : false}
/>
@ -1478,6 +1502,9 @@ export default function ProjEditStep2(props: any) {
/>
</Form.Item>
</div>
</Form>
</div>
<div className='cas' style={{