提示创建项目结尾
This commit is contained in:
parent
c42fb830b6
commit
ea49a44c0f
@ -94,7 +94,7 @@ export default function BelongPeople(props: propsInfo) {
|
|||||||
const [authorId, setAuthorId] = useState('') //所属人id
|
const [authorId, setAuthorId] = useState('') //所属人id
|
||||||
// 设置所属者more你选中的行
|
// 设置所属者more你选中的行
|
||||||
// const [selectedRowKeys, setSelectedRowKeys] = useState<BelongDataType[]>([]);
|
// const [selectedRowKeys, setSelectedRowKeys] = useState<BelongDataType[]>([]);
|
||||||
|
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||||
// 所属者搜索关键字
|
// 所属者搜索关键字
|
||||||
const [keywords, setKeyWords] = useState('')
|
const [keywords, setKeyWords] = useState('')
|
||||||
const [type, setType] = useState('')
|
const [type, setType] = useState('')
|
||||||
@ -111,37 +111,38 @@ export default function BelongPeople(props: propsInfo) {
|
|||||||
// 表格相关
|
// 表格相关
|
||||||
// rowSelection object indicates the need for row selection
|
// rowSelection object indicates the need for row selection
|
||||||
// 所属者表格选择触发
|
// 所属者表格选择触发
|
||||||
|
// const belongRowSelection = {
|
||||||
|
// onChange: (_selectedRowKeys: React.Key[], selectedRows: BelongDataType[]) => {
|
||||||
|
// setauthorName(selectedRows[0].name)
|
||||||
|
// setauthorIdCardType(selectedRows[0].idCardType)
|
||||||
|
// setauthorIdCard(selectedRows[0].idCardNo)
|
||||||
|
// setauthorType(selectedRows[0].type)
|
||||||
|
// setauthorProvinceCity(selectedRows[0].provinceCity)
|
||||||
|
// setauthorCrcAccount(selectedRows[0].isCrcAccount)
|
||||||
|
// setAuthorId(selectedRows[0].projOwnerId)
|
||||||
|
// },
|
||||||
|
|
||||||
|
// };
|
||||||
const belongRowSelection = {
|
const belongRowSelection = {
|
||||||
// selectedRowKeys: React.Key[]
|
selectedRowKeys,
|
||||||
onChange: (_selectedRowKeys: React.Key[], selectedRows: BelongDataType[]) => {
|
onChange: (selectedRowKeys: React.Key[], selectedRows: typeof tableBelongData[0][]) => {
|
||||||
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
|
setSelectedRowKeys(selectedRowKeys);
|
||||||
setauthorName(selectedRows[0].name)
|
if (selectedRows.length > 0) {
|
||||||
setauthorIdCardType(selectedRows[0].idCardType)
|
setauthorName(selectedRows[0].name);
|
||||||
setauthorIdCard(selectedRows[0].idCardNo)
|
setauthorIdCardType(selectedRows[0].idCardType);
|
||||||
setauthorType(selectedRows[0].type)
|
setauthorIdCard(selectedRows[0].idCardNo);
|
||||||
setauthorProvinceCity(selectedRows[0].provinceCity)
|
setauthorType(selectedRows[0].type);
|
||||||
setauthorCrcAccount(selectedRows[0].isCrcAccount)
|
setauthorProvinceCity(selectedRows[0].provinceCity);
|
||||||
// setauthorCrcAccountPassword(selectedRows[0].crcAccountPassword)
|
setauthorCrcAccount(selectedRows[0].isCrcAccount);
|
||||||
// setauthorCrcAccountUsername(selectedRows[0].crcAccountUsername)
|
setAuthorId(selectedRows[0].projOwnerId);
|
||||||
setAuthorId(selectedRows[0].projOwnerId)
|
}
|
||||||
// setClom(String(selectedRowKeys))
|
|
||||||
// setbelongselectedKeys(selectedRowKeys)
|
|
||||||
// props.setBelongPeopleName(selectedRows[0].name)
|
|
||||||
// props.setBelongPeopleInfo({
|
|
||||||
// authorName: selectedRows[0].name,
|
|
||||||
// authorType: selectedRows[0].type,
|
|
||||||
// authorIdCardType: selectedRows[0].idCardType,
|
|
||||||
// authorIdCard: selectedRows[0].idCardNo,
|
|
||||||
|
|
||||||
// authorCrcAccount: selectedRows[0].isCrcAccount,
|
|
||||||
// authorId: selectedRows[0].projOwnerId,
|
|
||||||
// authorProvinceCity: selectedRows[0].provinceCity
|
|
||||||
// })
|
|
||||||
// props.setValue(selectedRows[0].name)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
// 单行选择触发单选
|
||||||
|
const handleRowClick = (record: typeof tableBelongData[0]) => {
|
||||||
|
setSelectedRowKeys([record.projOwnerId]);
|
||||||
|
belongRowSelection.onChange([record.projOwnerId], [record]);
|
||||||
|
};
|
||||||
// 所属人表格数据
|
// 所属人表格数据
|
||||||
const [tableBelongData, setTableBelongData] = useState<BelongDataType[]>([])
|
const [tableBelongData, setTableBelongData] = useState<BelongDataType[]>([])
|
||||||
|
|
||||||
@ -519,13 +520,28 @@ export default function BelongPeople(props: propsInfo) {
|
|||||||
>
|
>
|
||||||
<Column
|
<Column
|
||||||
align="center"
|
align="center"
|
||||||
title="所属者名称" dataIndex="name" />
|
title="所属者名称" dataIndex="name"
|
||||||
|
render={(text, record: any) => (
|
||||||
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleRowClick(record)
|
||||||
|
}}>
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/>
|
||||||
<Column
|
<Column
|
||||||
align="center"
|
align="center"
|
||||||
title="所属类型"
|
title="所属类型"
|
||||||
dataIndex="type"
|
dataIndex="type"
|
||||||
render={(_text, record: any) => (
|
render={(_text, record: any) => (
|
||||||
record.type === 'PERSONAL' ? '自然人' : '企业/组织'
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleRowClick(record)
|
||||||
|
}}>
|
||||||
|
{record.type === 'PERSONAL' ? '自然人' : '企业/组织'}
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Column
|
<Column
|
||||||
@ -533,10 +549,22 @@ export default function BelongPeople(props: propsInfo) {
|
|||||||
title="所属证件类型"
|
title="所属证件类型"
|
||||||
dataIndex="idCardType"
|
dataIndex="idCardType"
|
||||||
render={(_text, record: any) => (
|
render={(_text, record: any) => (
|
||||||
record.idCardType === 'ID_CARD' ? '身份证' : '营业执照'
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleRowClick(record)
|
||||||
|
}}>
|
||||||
|
{record.idCardType === 'ID_CARD' ? '身份证' : '营业执照'}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<Column align="center" title="所属者身份证号" dataIndex="idCardNo" key="belongCardNo"
|
||||||
|
render={(text, record: any) => (
|
||||||
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleRowClick(record)
|
||||||
|
}}>
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Column align="center" title="所属者身份证号" dataIndex="idCardNo" key="belongCardNo" />
|
|
||||||
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
||||||
<Column
|
<Column
|
||||||
align="center"
|
align="center"
|
||||||
@ -887,10 +915,10 @@ export default function BelongPeople(props: propsInfo) {
|
|||||||
|
|
||||||
disabled={belongTitle == '查看所属者' ? true : false}
|
disabled={belongTitle == '查看所属者' ? true : false}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<div className='prompt'>(注:如有多个著作人请用逗号分割)</div>
|
<div className='prompt'>(注:如有多个著作人请用逗号分割)</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</Col>
|
</Col>
|
||||||
|
@ -79,20 +79,31 @@ export default function ContactPeople(props: any) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||||
// 联系人表格选择触发
|
// 联系人表格选择触发
|
||||||
const ContantRowSelection = {
|
const ContantRowSelection = {
|
||||||
// selectedRowKeys: React.Key[]
|
// selectedRowKeys: React.Key[]
|
||||||
onChange: (_selectedRowKeys: React.Key[], selectedRows: ContactDataType[]) => {
|
selectedRowKeys,
|
||||||
|
onChange: (selectedRowKeys: React.Key[], selectedRows: typeof tableContactData[0][]) => {
|
||||||
|
setSelectedRowKeys(selectedRowKeys);
|
||||||
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
|
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
|
||||||
setApplyConcatId(selectedRows[0].projContactId)
|
if (selectedRows.length > 0) {
|
||||||
setapplyContactCsaNo(selectedRows[0].csaNo)
|
setApplyConcatId(selectedRows[0].projContactId)
|
||||||
setapplyContactEmail(selectedRows[0].email)
|
setapplyContactCsaNo(selectedRows[0].csaNo)
|
||||||
setapplyContactName(selectedRows[0].name)
|
setapplyContactEmail(selectedRows[0].email)
|
||||||
setapplyContactPhone(selectedRows[0].phone)
|
setapplyContactName(selectedRows[0].name)
|
||||||
setapplyContactCompany(selectedRows[0].company)
|
setapplyContactPhone(selectedRows[0].phone)
|
||||||
|
setapplyContactCompany(selectedRows[0].company)
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
// 单行选择触发单选
|
||||||
|
const handleRowClick = (record: typeof tableContactData[0]) => {
|
||||||
|
setSelectedRowKeys([record.projContactId]);
|
||||||
|
ContantRowSelection.onChange([record.projContactId], [record]);
|
||||||
|
};
|
||||||
// 点击创建联系热人获取随机客服
|
// 点击创建联系热人获取随机客服
|
||||||
const getCas = () => {
|
const getCas = () => {
|
||||||
get({
|
get({
|
||||||
@ -253,11 +264,42 @@ export default function ContactPeople(props: any) {
|
|||||||
style={{ textAlign: 'center', height: 390 }} // 设置表格内容居中显示
|
style={{ textAlign: 'center', height: 390 }} // 设置表格内容居中显示
|
||||||
rowKey="projContactId" // 指定数据项的唯一标识符
|
rowKey="projContactId" // 指定数据项的唯一标识符
|
||||||
>
|
>
|
||||||
<Column align="center" title="联系人" dataIndex="name" />
|
<Column align="center" title="联系人" dataIndex="name"
|
||||||
<Column align="center" title="联系人手机号" dataIndex="phone" />
|
render={(text, record: any) => (
|
||||||
<Column align="center" title="平台专属客服" dataIndex="csaNo" />
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleRowClick(record)
|
||||||
|
}}>
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<Column align="center" title="联系人手机号" dataIndex="phone"
|
||||||
|
render={(text, record: any) => (
|
||||||
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleRowClick(record)
|
||||||
|
}}>
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<Column align="center" title="平台专属客服" dataIndex="csaNo"
|
||||||
|
render={(text, record: any) => (
|
||||||
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleRowClick(record)
|
||||||
|
}}>
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
<Column align="center" title="所属公司" dataIndex="company"
|
<Column align="center" title="所属公司" dataIndex="company"
|
||||||
render={(text) => (text !== '' ? text : '一')}
|
// render={(text) => (text !== '' ? text : '一')}
|
||||||
|
render={(text, record: any) => (
|
||||||
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleRowClick(record)
|
||||||
|
}}>
|
||||||
|
{text !== '' ? text : '一'}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
||||||
|
@ -597,7 +597,7 @@ export default function CardProj(props: any) {
|
|||||||
) : <></>
|
) : <></>
|
||||||
}
|
}
|
||||||
</div> */}
|
</div> */}
|
||||||
<div className='cpbc-bot' style={{ color: '#FFA415' }}>
|
<div className='cpbc-bot' style={{ color: '#FFA415' }} title={data.apply.authorName}>
|
||||||
|
|
||||||
产权所属者:{data.apply.authorName}
|
产权所属者:{data.apply.authorName}
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ export default function ProjNew() {
|
|||||||
const [messageApi, contextHolder] = message.useMessage();
|
const [messageApi, contextHolder] = message.useMessage();
|
||||||
const [loading, setLoading] = useState<boolean>(false);
|
const [loading, setLoading] = useState<boolean>(false);
|
||||||
const height = window.innerHeight - 180;
|
const height = window.innerHeight - 180;
|
||||||
|
// 提示结尾是否带关键字弹窗
|
||||||
|
// const [hasKeywords, setHasKeywords] = useState<boolean>(false);
|
||||||
|
// 创建项目弹窗
|
||||||
const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);
|
||||||
const [isEditModalOpen, setIsEditModalOpen] = useState(false);
|
const [isEditModalOpen, setIsEditModalOpen] = useState(false);
|
||||||
const [chargePrice, setChargePrice] = useState(0);
|
const [chargePrice, setChargePrice] = useState(0);
|
||||||
@ -124,6 +127,15 @@ export default function ProjNew() {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//判断是否以“软件”、“系统”、“平台”或“APP”结尾
|
||||||
|
function isEndsWithKeywords(str: string) {
|
||||||
|
const keywords = ["软件", "系统", "平台", "APP"];
|
||||||
|
return keywords.some(keyword => str.endsWith(keyword));
|
||||||
|
}
|
||||||
|
// 提示信息是否显示
|
||||||
|
const [showTip, setShowTip] = useState(false)
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
get({
|
get({
|
||||||
messageApi: messageApi,
|
messageApi: messageApi,
|
||||||
@ -138,7 +150,7 @@ export default function ProjNew() {
|
|||||||
switch (pathParams.projChargeType) {
|
switch (pathParams.projChargeType) {
|
||||||
case ProjChargeType.ALL:
|
case ProjChargeType.ALL:
|
||||||
// price = charge.proj.all;
|
// price = charge.proj.all;
|
||||||
price = charge.projTypes[0].price ;
|
price = charge.projTypes[0].price;
|
||||||
break;
|
break;
|
||||||
// case ProjChargeType.MATERIAL_AGENT:
|
// case ProjChargeType.MATERIAL_AGENT:
|
||||||
// price = charge.proj.materialAgent;
|
// price = charge.proj.materialAgent;
|
||||||
@ -147,7 +159,7 @@ export default function ProjNew() {
|
|||||||
// price = charge.proj.materialAgentUrgent;
|
// price = charge.proj.materialAgentUrgent;
|
||||||
// break;
|
// break;
|
||||||
case ProjChargeType.MATERIAL:
|
case ProjChargeType.MATERIAL:
|
||||||
price = charge.projTypes[1].price ;
|
price = charge.projTypes[1].price;
|
||||||
break;
|
break;
|
||||||
case ProjChargeType.FREE:
|
case ProjChargeType.FREE:
|
||||||
price = charge.projTypes[2].price;
|
price = charge.projTypes[2].price;
|
||||||
@ -214,6 +226,12 @@ export default function ProjNew() {
|
|||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
onFinish={(formData) => {
|
onFinish={(formData) => {
|
||||||
|
// if(isEndsWithKeywords(formData.projName)){
|
||||||
|
// setIsCreateModalOpen(true);
|
||||||
|
|
||||||
|
// }else{
|
||||||
|
// setHasKeywords(true);
|
||||||
|
// }
|
||||||
setIsCreateModalOpen(true);
|
setIsCreateModalOpen(true);
|
||||||
setProjInfo({
|
setProjInfo({
|
||||||
projName: formData.projName,
|
projName: formData.projName,
|
||||||
@ -225,14 +243,39 @@ export default function ProjNew() {
|
|||||||
}}
|
}}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
>
|
>
|
||||||
<div className='formItemOne'>
|
<div style={{ position: 'relative' }}>
|
||||||
<div className='formItem-title oneTitle'>系统全称*</div>
|
<div className='formItemOne'>
|
||||||
<Form.Item<ProjInfo>
|
<div className='formItem-title oneTitle'>系统全称*</div>
|
||||||
name="projName"
|
<Form.Item<ProjInfo>
|
||||||
rules={[{ required: true, message: '请输入系统全称' }]}
|
name="projName"
|
||||||
>
|
rules={[
|
||||||
<Input style={{ background: '#eeeeee', width: '800px', height: '50px', fontSize: '16px' }} placeholder="请输入系统全称" />
|
{ required: true, message: '请输入系统全称' },
|
||||||
</Form.Item>
|
]}
|
||||||
|
>
|
||||||
|
<Input onChange={(e) => {
|
||||||
|
// 打印值
|
||||||
|
// console.log(e.target.value);
|
||||||
|
if (e.target.value) {
|
||||||
|
if (isEndsWithKeywords(e.target.value)) {
|
||||||
|
setShowTip(false)
|
||||||
|
} else {
|
||||||
|
setShowTip(true)
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
setShowTip(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}} style={{ background: '#eeeeee', width: '800px', height: '50px', fontSize: '16px' }} placeholder="请输入系统全称 (注:系统全称建议以“软件”、“系统”、“平台”或“APP”结尾)" />
|
||||||
|
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div style={{
|
||||||
|
position: 'absolute', left: 185,
|
||||||
|
display: showTip ? 'unset' : 'none',
|
||||||
|
color: 'green',
|
||||||
|
}}>系统全称建议以“软件”、“系统”、“平台”或“APP”结尾</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='formItemOne' style={{ marginTop: 20, position: 'relative' }}>
|
<div className='formItemOne' style={{ marginTop: 20, position: 'relative' }}>
|
||||||
<div className='formItem-title '>
|
<div className='formItem-title '>
|
||||||
@ -398,7 +441,7 @@ export default function ProjNew() {
|
|||||||
applyContactPhone: concatPeopleInfo.applyContactPhone,
|
applyContactPhone: concatPeopleInfo.applyContactPhone,
|
||||||
projVersion: 'v1.0',
|
projVersion: 'v1.0',
|
||||||
|
|
||||||
couponId:couponId?couponId:'',
|
couponId: couponId ? couponId : '',
|
||||||
},
|
},
|
||||||
onBefore() {
|
onBefore() {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
@ -421,10 +464,10 @@ export default function ProjNew() {
|
|||||||
}}
|
}}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setIsCreateModalOpen(false);
|
setIsCreateModalOpen(false);
|
||||||
|
|
||||||
|
|
||||||
}}>
|
}}>
|
||||||
<div>该操作会扣除 {(chargePrice / 100 - couponNum)<0?0:chargePrice / 100 - couponNum} 元,确定操作码?</div>
|
<div>该操作会扣除 {(chargePrice / 100 - couponNum) < 0 ? 0 : chargePrice / 100 - couponNum} 元,确定操作码?</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
<Modal title="提示"
|
<Modal title="提示"
|
||||||
okText="确定"
|
okText="确定"
|
||||||
@ -444,6 +487,23 @@ export default function ProjNew() {
|
|||||||
}}>
|
}}>
|
||||||
<div>项目创建成功,开始编辑项目?</div>
|
<div>项目创建成功,开始编辑项目?</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
{/* <Modal title="提示"
|
||||||
|
okText="更改"
|
||||||
|
cancelText="继续"
|
||||||
|
open={hasKeywords}
|
||||||
|
onOk={() => {
|
||||||
|
//Form表单的projName变为空
|
||||||
|
form.resetFields(['projName']);
|
||||||
|
setHasKeywords(false);
|
||||||
|
|
||||||
|
}}
|
||||||
|
centered
|
||||||
|
onCancel={() => {
|
||||||
|
setHasKeywords(false);
|
||||||
|
setIsCreateModalOpen(true);
|
||||||
|
}}>
|
||||||
|
<div>系统全称建议以“软件”、“系统”、“平台”或“APP”结尾,是否更改</div>
|
||||||
|
</Modal> */}
|
||||||
<Modal title="选择联系人"
|
<Modal title="选择联系人"
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
|
|
||||||
@ -488,7 +548,7 @@ export default function ProjNew() {
|
|||||||
setCouponId={(value: string) => {
|
setCouponId={(value: string) => {
|
||||||
setCouponId(value)
|
setCouponId(value)
|
||||||
}}
|
}}
|
||||||
couponNum = {couponNum}
|
couponNum={couponNum}
|
||||||
setCouponNum={(value: number) => {
|
setCouponNum={(value: number) => {
|
||||||
setCouponNum(value)
|
setCouponNum(value)
|
||||||
}}
|
}}
|
||||||
|
@ -122,40 +122,64 @@ export default function ProjEditStep2(props: any) {
|
|||||||
|
|
||||||
// 表格相关
|
// 表格相关
|
||||||
// rowSelection object indicates the need for row selection
|
// rowSelection object indicates the need for row selection
|
||||||
|
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||||
// 所属者表格选择触发
|
// 所属者表格选择触发
|
||||||
const belongRowSelection = {
|
const belongRowSelection = {
|
||||||
|
selectedRowKeys,
|
||||||
// selectedRowKeys: React.Key[]
|
// selectedRowKeys: React.Key[]
|
||||||
onChange: (_selectedRowKeys: React.Key[], selectedRows: BelongDataType[]) => {
|
onChange: (selectedRowKeys: React.Key[], selectedRows: BelongDataType[]) => {
|
||||||
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
|
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
|
||||||
setauthorName(selectedRows[0].name)
|
setSelectedRowKeys(selectedRowKeys);
|
||||||
setauthorIdCardType(selectedRows[0].idCardType)
|
if (selectedRows.length > 0) {
|
||||||
setauthorIdCard(selectedRows[0].idCardNo)
|
setauthorName(selectedRows[0].name)
|
||||||
setauthorType(selectedRows[0].type)
|
setauthorIdCardType(selectedRows[0].idCardType)
|
||||||
setauthorNameEn(selectedRows[0].nameEn)
|
setauthorIdCard(selectedRows[0].idCardNo)
|
||||||
setauthorProvinceCity(selectedRows[0].provinceCity)
|
setauthorType(selectedRows[0].type)
|
||||||
setauthorCrcAccount(selectedRows[0].isCrcAccount)
|
setauthorNameEn(selectedRows[0].nameEn)
|
||||||
setauthorCrcAccountPassword(selectedRows[0].crcAccountPassword)
|
setauthorProvinceCity(selectedRows[0].provinceCity)
|
||||||
setauthorCrcAccountUsername(selectedRows[0].crcAccountUsername)
|
setauthorCrcAccount(selectedRows[0].isCrcAccount)
|
||||||
setAuthorId(selectedRows[0].projOwnerId)
|
setauthorCrcAccountPassword(selectedRows[0].crcAccountPassword)
|
||||||
|
setauthorCrcAccountUsername(selectedRows[0].crcAccountUsername)
|
||||||
|
setAuthorId(selectedRows[0].projOwnerId)
|
||||||
|
}
|
||||||
|
|
||||||
// setClom(String(selectedRowKeys))
|
// setClom(String(selectedRowKeys))
|
||||||
// setbelongselectedKeys(selectedRowKeys)
|
// setbelongselectedKeys(selectedRowKeys)
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
// 所属者表格单行选择触发单选
|
||||||
|
const handleRowClick = (record: typeof tableBelongData[0]) => {
|
||||||
|
setSelectedRowKeys([record.projOwnerId]);
|
||||||
|
belongRowSelection.onChange([record.projOwnerId], [record]);
|
||||||
|
};
|
||||||
|
const [selectedContantRowKeys, setSelectedContantRowKeys] = useState<React.Key[]>([]);
|
||||||
// 联系人表格选择触发
|
// 联系人表格选择触发
|
||||||
const ContantRowSelection = {
|
const ContantRowSelection = {
|
||||||
|
selectedRowKeys:selectedContantRowKeys,
|
||||||
// selectedRowKeys: React.Key[]
|
// selectedRowKeys: React.Key[]
|
||||||
onChange: (_selectedRowKeys: React.Key[], selectedRows: ContactDataType[]) => {
|
onChange: (selectedRowKeys: React.Key[], selectedRows: ContactDataType[]) => {
|
||||||
|
setSelectedContantRowKeys(selectedRowKeys);
|
||||||
|
// console.log(selectedRowKeys);
|
||||||
|
|
||||||
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
|
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
|
||||||
setApplyConcatId(selectedRows[0].projContactId)
|
if (selectedRows.length > 0) {
|
||||||
setapplyContactCsaNo(selectedRows[0].csaNo)
|
setApplyConcatId(selectedRows[0].projContactId)
|
||||||
setapplyContactEmail(selectedRows[0].email)
|
setapplyContactCsaNo(selectedRows[0].csaNo)
|
||||||
setapplyContactName(selectedRows[0].name)
|
setapplyContactEmail(selectedRows[0].email)
|
||||||
setapplyContactPhone(selectedRows[0].phone)
|
setapplyContactName(selectedRows[0].name)
|
||||||
setapplyContactCompany(selectedRows[0].company)
|
setapplyContactPhone(selectedRows[0].phone)
|
||||||
|
setapplyContactCompany(selectedRows[0].company)
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
// 单行选择触发单选
|
||||||
|
const handleContantRowClick = (record: typeof tableContactData[0]) => {
|
||||||
|
setSelectedContantRowKeys([record.projContactId]);
|
||||||
|
ContantRowSelection.onChange([record.projContactId], [record]);
|
||||||
|
};
|
||||||
// 所属人表格数据
|
// 所属人表格数据
|
||||||
const [tableBelongData, setTableBelongData] = useState<BelongDataType[]>([])
|
const [tableBelongData, setTableBelongData] = useState<BelongDataType[]>([])
|
||||||
// 联系人表格数据
|
// 联系人表格数据
|
||||||
@ -741,13 +765,27 @@ export default function ProjEditStep2(props: any) {
|
|||||||
style={{ textAlign: 'center' }} // 设置表格内容居中显示
|
style={{ textAlign: 'center' }} // 设置表格内容居中显示
|
||||||
rowKey="projOwnerId" // 指定数据项的唯一标识符
|
rowKey="projOwnerId" // 指定数据项的唯一标识符
|
||||||
>
|
>
|
||||||
<Column title="所属者名称" align="center" dataIndex="name" />
|
<Column title="所属者名称" align="center" dataIndex="name"
|
||||||
|
|
||||||
|
render={(text, record: any) => (
|
||||||
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleRowClick(record)
|
||||||
|
}}>
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
/>
|
||||||
<Column
|
<Column
|
||||||
title="所属类型"
|
title="所属类型"
|
||||||
dataIndex="type"
|
dataIndex="type"
|
||||||
align="center"
|
align="center"
|
||||||
render={(_text, record: any) => (
|
render={(_text, record: any) => (
|
||||||
record.type === 'PERSONAL' ? '自然人' : '企业/组织'
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleRowClick(record)
|
||||||
|
}}>
|
||||||
|
{record.type === 'PERSONAL' ? '自然人' : '企业/组织'}
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Column
|
<Column
|
||||||
@ -755,10 +793,22 @@ export default function ProjEditStep2(props: any) {
|
|||||||
align="center"
|
align="center"
|
||||||
dataIndex="idCardType"
|
dataIndex="idCardType"
|
||||||
render={(_text, record: any) => (
|
render={(_text, record: any) => (
|
||||||
record.idCardType === 'ID_CARD' ? '身份证' : '营业执照'
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleRowClick(record)
|
||||||
|
}}>
|
||||||
|
{record.idCardType === 'ID_CARD' ? '身份证' : '营业执照'}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<Column title="所属者证件号" align="center" dataIndex="idCardNo" key="belongCardNo"
|
||||||
|
render={(text, record: any) => (
|
||||||
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleRowClick(record)
|
||||||
|
}}>
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Column title="所属者证件号" align="center" dataIndex="idCardNo" key="belongCardNo" />
|
|
||||||
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
||||||
<Column
|
<Column
|
||||||
title="操作"
|
title="操作"
|
||||||
@ -901,11 +951,41 @@ export default function ProjEditStep2(props: any) {
|
|||||||
style={{ textAlign: 'center' }} // 设置表格内容居中显示
|
style={{ textAlign: 'center' }} // 设置表格内容居中显示
|
||||||
rowKey="projContactId" // 指定数据项的唯一标识符
|
rowKey="projContactId" // 指定数据项的唯一标识符
|
||||||
>
|
>
|
||||||
<Column title="联系人" align="center" dataIndex="name" />
|
<Column title="联系人" align="center" dataIndex="name"
|
||||||
<Column title="联系人手机号" align="center" dataIndex="phone" />
|
render={(text, record: any) => (
|
||||||
<Column title="平台专属客服" align="center" dataIndex="csaNo" />
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleContantRowClick(record)
|
||||||
|
}}>
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<Column title="联系人手机号" align="center" dataIndex="phone"
|
||||||
|
render={(text, record: any) => (
|
||||||
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleContantRowClick(record)
|
||||||
|
}}>
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<Column title="平台专属客服" align="center" dataIndex="csaNo"
|
||||||
|
render={(text, record: any) => (
|
||||||
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleContantRowClick(record)
|
||||||
|
}}>
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
<Column title="所属公司" align="center" dataIndex="company"
|
<Column title="所属公司" align="center" dataIndex="company"
|
||||||
render={(text) => (text !== '' ? text : '一')}
|
render={(text, record: any) => (
|
||||||
|
<div style={{ cursor: 'default' }} onClick={() => {
|
||||||
|
handleContantRowClick(record)
|
||||||
|
}}>
|
||||||
|
{text !== '' ? text : '一'}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
||||||
@ -1200,7 +1280,7 @@ export default function ProjEditStep2(props: any) {
|
|||||||
|
|
||||||
disabled={belongTitle == '查看所属者' ? true : false}
|
disabled={belongTitle == '查看所属者' ? true : false}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<div className='prompt'>(注:如有多个著作人请用逗号分割)</div>
|
<div className='prompt'>(注:如有多个著作人请用逗号分割)</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1216,12 +1296,12 @@ export default function ProjEditStep2(props: any) {
|
|||||||
// rules={[{ required: true, message: belongShow == 'PERSONAL' ? '请输入英文名' : '请输入公司英文名称' }]}
|
// rules={[{ required: true, message: belongShow == 'PERSONAL' ? '请输入英文名' : '请输入公司英文名称' }]}
|
||||||
rules={
|
rules={
|
||||||
[
|
[
|
||||||
// { required: true, message: belongShow == 'PERSONAL' ? '请输入英文名' : '请输入公司英文名称' },
|
// { required: true, message: belongShow == 'PERSONAL' ? '请输入英文名' : '请输入公司英文名称' },
|
||||||
// {
|
// {
|
||||||
// pattern: /^[A-Za-z]+$/,
|
// pattern: /^[A-Za-z]+$/,
|
||||||
// message: '请输入正确的英文名'
|
// message: '请输入正确的英文名'
|
||||||
// }
|
// }
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input placeholder={belongShow == 'ORGANIZATION' ? '请输入公司英文名称' : '请输入英文名'}
|
<Input placeholder={belongShow == 'ORGANIZATION' ? '请输入公司英文名称' : '请输入英文名'}
|
||||||
style={{ height: '44px', width: '360px', fontSize: '15px', marginTop: '22px' }}
|
style={{ height: '44px', width: '360px', fontSize: '15px', marginTop: '22px' }}
|
||||||
|
Loading…
Reference in New Issue
Block a user