From 7a885cec8e1203ca8e9b56ff8d6d1d953f1d1787 Mon Sep 17 00:00:00 2001 From: xixi <123@qq.com> Date: Wed, 15 May 2024 18:00:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/Type/statedata.d.ts | 23 +- src/route/index/Index.tsx | 21 +- src/route/proj/edit/ProjEditStep2.tsx | 1072 +++++++++++++++++------- src/route/proj/edit/ProjEditStep4.tsx | 2 + src/route/proj/edit/proj-edit-step.css | 103 ++- 5 files changed, 917 insertions(+), 304 deletions(-) diff --git a/src/layout/Type/statedata.d.ts b/src/layout/Type/statedata.d.ts index 03a93ea..ac93581 100644 --- a/src/layout/Type/statedata.d.ts +++ b/src/layout/Type/statedata.d.ts @@ -1,3 +1,22 @@ -interface BelongDataType{ - +interface BelongDataType { + crcAccountPassword: string + crcAccountUsername: string + gmtCreate: string + gmtModified: string + idCardNo: string + idCardType: string + isCrcAccount: number + name: "Lam On Kay" + nameEn: string + projOwnerId: string + provinceCity: string + type: string +} +interface ContactDataType { + csaNo: string + gmtCreate: string + gmtModified: string + name: string + phone: string + projContactId: string } \ No newline at end of file diff --git a/src/route/index/Index.tsx b/src/route/index/Index.tsx index 984be0c..a9f6709 100644 --- a/src/route/index/Index.tsx +++ b/src/route/index/Index.tsx @@ -153,30 +153,30 @@ export default function Index() { setNow('创建项目') setPathArray([{ title: 首页 }, { title: '创建项目' }]) // - } else if (location.pathname.includes('/proj-edit')&&!location.pathname.includes('/step')) { + } else if (location.pathname.includes('/proj-edit') && !location.pathname.includes('/step')) { setNow('编辑项目') // setEditname(location.pathname) - setPathArray([{ title: 首页 }, { title: 创建项目 }, { title:'编辑项目'}]) + setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: '编辑项目' }]) } else if (location.pathname.includes('/proj-new')) { setNow('新建项目') // setNewname(location.pathname) setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: '新建项目' }]) - }else if (location.pathname.includes('/proj-efree')) { + } else if (location.pathname.includes('/proj-efree')) { setNow('编辑项目') // setNewname(location.pathname) setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: '编辑项目' }]) - }else if (location.pathname.includes('/proj-eall')) { + } else if (location.pathname.includes('/proj-eall')) { setNow('编辑项目') // setNewname(location.pathname) setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: '编辑项目' }]) - }else if (location.pathname.includes('/proj-edit/step1')) { + } else if (location.pathname.includes('/proj-edit/step1')) { setNow('标题简介') // setNewname(location.pathname) - setPathArray([{ title: 首页 }, { title: 创建项目 }, {title: {nav(-1)}}>编辑项目},{title: '标题简介'}]) - }else if (location.pathname.includes('/proj-edit/step2')) { + setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '标题简介' }]) + } else if (location.pathname.includes('/proj-edit/step2')) { setNow('标题简介') // setNewname(location.pathname) - setPathArray([{ title: 首页 }, { title: 创建项目 }, {title: {nav(-1)}}>编辑项目},{title: '基本信息'}]) + setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '基本信息' }]) } // /proj-edit/step1 @@ -231,6 +231,11 @@ export default function Index() { list={agentMenu.list} handleListItem={agentMenu.handleListItem} /> + {/* */}
diff --git a/src/route/proj/edit/ProjEditStep2.tsx b/src/route/proj/edit/ProjEditStep2.tsx index 98409ae..1722cb0 100644 --- a/src/route/proj/edit/ProjEditStep2.tsx +++ b/src/route/proj/edit/ProjEditStep2.tsx @@ -1,16 +1,17 @@ import './proj-edit-step.css'; -import { Breadcrumb, Cascader, Col, DatePicker, Flex, message, Modal, Row, Spin, Select, Table, Space } from "antd"; +import { Breadcrumb, Radio, Cascader, Col, DatePicker, Flex, message, Modal, Row, Spin, Select, Table, Space } from "antd"; import { FolderAddOutlined } from '@ant-design/icons'; import locale from 'antd/es/date-picker/locale/zh_CN'; import { Link, useNavigate, useParams } from "react-router-dom"; import { useEffect, useState } from "react"; -import { get, put } from "../../../util/AjaxUtils.ts"; +import { get, put, post, del, downloadUrl } from "../../../util/AjaxUtils.ts"; import { Button, Form, Input } from 'antd'; import { AxiosResponse } from "axios"; import dayjs, { Dayjs } from 'dayjs'; import type { SearchProps } from 'antd/es/input/Search'; // import type { TableColumnsType } from 'antd'; import { ITree } from "../../../interfaces/dict/IDict.ts"; + const { Search } = Input; const { Column } = Table; // 基本信息文件类型 @@ -29,14 +30,28 @@ type BelongPeopleType = { authorNation: string; authorProvince: string; authorEstablishDate: Dayjs; + authorType: string; + nameEn: string; + isCrcAccount: string; + crcAccountPassword: string; + crcAccountUsername: string; } -interface DataType { - key: React.Key; - name: string; - age: number; - address: string; - select: boolean; +type ContactType = { + csaNo: string + gmtCreate: string + gmtModified: string + name: string + phone: string + projContactId: string + email: string } +// interface DataType { +// key: React.Key; +// name: string; +// age: number; +// address: string; +// select: boolean; +// } interface Option { value?: string | number | null; label: React.ReactNode; @@ -52,96 +67,74 @@ export default function ProjEditStep2() { const [messageApi, contextHolder] = message.useMessage(); const [formInfo] = Form.useForm(); const [formBelong] = Form.useForm(); + const [formContact] = Form.useForm() const [loading, setLoading] = useState(false); const [isEditModalOpen, setIsEditModalOpen] = useState(false); const [isNewBelongOpen, setIsNewBelongOpen] = useState(false) + const [isContantOpen, steIsContantOpen] = useState(false) const height = window.innerHeight - 220; const dateFormat = 'YYYY年MM月DD日'; + // 页面显示的所属者信息 + const [authorName,setauthorName] = useState('') + const [authorIdCardType,setauthorIdCardType]= useState('') + const [authorIdCard,setauthorIdCard]= useState('') + const [authorType,setauthorType] = useState('') + // 所属者搜索关键字 + // const [keywords, setKeyWords] = useState('') + const [type, setType] = useState('') // 表格第几行数据 // const [clom, setClom] = useState('') // 著作人搜索 const belongPeopleSearch: SearchProps['onSearch'] = (value, _e, info) => ( console.log(info?.source, value), - alert(value) + // setKeyWords(value), + getSearchProjOwnerList(value, type) ); // 申请人信息搜索 applicantPeopleSearch const applicantPeopleSearch: SearchProps['onSearch'] = (value, _e, info) => ( console.log(info?.source, value), - alert(value) + // alert(value), + getSearchProjContactList(value) ); // 表格相关 // rowSelection object indicates the need for row selection - const rowSelection = { + // 所属者表格选择触发 + const belongRowSelection = { // selectedRowKeys: React.Key[] - onChange: (selectedRowKeys: React.Key[], selectedRows: DataType[]) => { + onChange: (selectedRowKeys: React.Key[], selectedRows: BelongDataType[]) => { console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows); // setClom(String(selectedRowKeys)) - setSelectedKeyst(selectedRowKeys) + // setbelongselectedKeys(selectedRowKeys) + }, + + }; + // 联系人表格选择触发 + const ContantRowSelection = { + // selectedRowKeys: React.Key[] + onChange: (selectedRowKeys: React.Key[], selectedRows: ContactDataType[]) => { + console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows); + // setClom(String(selectedRowKeys)) + // setSelectedKeyst(selectedRowKeys) }, }; const datanew = [] - // 所属着表格数据 - const [tableBelongData, setTableBelongData] = useState([]) - const data: DataType[] = [ - { - key: '1', - name: 'John Brown', - age: 32, - address: 'New York No. 1 Lake Park', - select: false - }, - { - key: '2', - name: 'Jim Green', - age: 42, - address: 'London No. 1 Lake Park', - select: true - - }, - { - key: '3', - name: 'Joe Black', - age: 32, - address: 'Sydney No. 1 Lake Park', - select: false - - }, - { - key: '4', - name: 'Disabled User', - age: 99, - address: 'Sydney No. 1 Lake Park', - select: false - - }, - { - key: '5', - name: '嘻嘻', - age: 99, - address: 'Sydney No. 1 Lake Park', - select: false - - }, - { - key: '6', - name: '呵呵', - age: 99, - address: 'Sydney No. 1 Lake Park', - select: false - - }, + // 所属人表格数据 + const [tableBelongData, setTableBelongData] = useState([]) + // 联系人表格数据 + const [tableContactData, setTableContactData] = useState([]) - - ]; - const [selectedKeys, setSelectedKeyst] = useState(data.filter(item => item.select).map(item => item.key)) // const selectedKeys = data.filter(item => item.select).map(item => item.key); - console.log('selectedKeys:', selectedKeys); - - // 创建所属者弹窗数据 + // console.log('selectedKeys:', selectedKeys); + // 是否提供中国版账号 + // 所属者id 关键字 + const [projOwnerId, setProjOwnerId] = useState('') + // 联系人id 关键字 + const [contactId, setContactId] = useState('') + // 所属者弹窗数据 const [belongTitle, setbelongTitle] = useState('') const [areaArray, setAreaArray] = useState([]); const listArea = (pId: string) => { @@ -160,36 +153,72 @@ export default function ProjEditStep2() { }) }) } + // 联系热弹窗数据 + const [contactTitle, setContactTitle] = useState('') - - // 验证创建著作人表单信息 + // 著作人表单信息 点击确定 const handleOk = () => { formBelong.validateFields().then(() => { // 如果验证通过,则执行确认操作 // 这里可以放置你的确认操作逻辑 - // alert(formBelong.getFieldValue('authorName')); + if (belongTitle === '编辑所属者') { + upProjOwner() + } + if (belongTitle === '创建所属者') { + newProjOwner() + } // 关闭 弹窗 - setIsNewBelongOpen(false) + // setIsNewBelongOpen(false) // 初始化数据 formBelong.resetFields(); // 重置表单字段为初始值 - // alert('嘻嘻') }).catch(() => { // 如果验证不通过,可以根据需要处理错误信息 // (errorInfo); }); }; + // 联系人人表单信息 点击确定 + const contactHandleOk = () => { + // alert('联系热确定') + formContact.validateFields().then(() => { + // 如果验证通过,则执行确认操作 + // 这里可以放置你的确认操作逻辑 + if (contactTitle === '编辑联系人') { + upContact() + } + if (contactTitle === '创建联系人') { + newContact() + } + // 关闭 弹窗 + // setIsNewBelongOpen(false) + // 初始化数据 + formContact.resetFields(); // 重置表单字段为初始值 - - useEffect(() => { - // 基本信息页面信息 + }).catch(() => { + // 如果验证不通过,可以根据需要处理错误信息 + // (errorInfo); + }); + }; + // 从基本信息中获取到的两个表格默认选择的id 所属者id 联系人id + const [authorId, setAuthorId] = useState('') + const [applyConcatId, setApplyConcatId] = useState('') + // const [belongselectedKeys,setbelongselectedKeys] = useState(tableBelongData.filter(item => item.projOwnerId === authorId).map(item => item.projOwnerId)); + // 获取页面基本信息信息 + const getEditstep = () => { get({ messageApi, url: `/api/proj/get/edit-step2/${pathParams.projId}`, onSuccess({ data }: AxiosResponse) { - // console.log('基本信息',data); + // 获取默认所属人信息 + setauthorName(data.authorName) + setauthorIdCardType(data.authorIdCardType) + setauthorIdCard(data.authorIdCard) + setauthorType(data.authorType) + console.log('基本信息', data); + setAuthorId(data.authorId) + setApplyConcatId(data.applyConcatId) formInfo.setFieldsValue({ projSubName: data.projSubName, projVersion: data.projVersion, @@ -199,32 +228,199 @@ export default function ProjEditStep2() { }) } }) - // 所属者信息 + } + // 获取所属者表格 + const getProjOwnerList = () => { get({ messageApi, - url: `/api/proj/get/edit-step4/${pathParams.projId}`, - onSuccess({data}: AxiosResponse) { - console.log('所属者信息',data); - - } - }) - // 所属者表格 - get({ - messageApi, - // url: `/api/proj/get/edit-step2/${pathParams.projId}`, - - url: `/api/proj-owner/listpage`, - // config: { - // params: { - // } - // }, + url: `/api/proj-owner/list/self`, onSuccess({ data }: AxiosResponse) { console.log('所属者表格', data); + setTableBelongData(data) + } + }) + } + // 获取联系人表格 + const getProjContactList = () => { + get({ + messageApi, + url: `/api/proj-contact/list/self`, + onSuccess({ data }: AxiosResponse) { + console.log('联系人表格', data); + // setTableBelongData(data) + setTableContactData(data) + } + }) + } + // 获取所属表格 带搜索 + const getSearchProjOwnerList = (keywords: any, type: any) => { + get({ + messageApi, + url: `/api/proj-owner/list/self?keywords=${keywords}&type=${type}`, + onSuccess({ data }: AxiosResponse) { + console.log('搜索所属者表格', data); + setTableBelongData(data) + } + }) + } + // 获取联系人表格 带搜索 + const getSearchProjContactList = (keywords: any) => { + get({ + messageApi, + url: `/api/proj-contact/list/self?keywords=${keywords}`, + onSuccess({ data }: AxiosResponse) { + // console.log('联系人表格', data); + // setTableBelongData(data) + setTableContactData(data) + } + }) + } + // 编辑所属者 + const upProjOwner = () => { + const crcAccountPassword = Number(formBelong.getFieldValue('isCrcAccount')) == 1 ? formBelong.getFieldValue('crcAccountPassword') : '' + const crcAccountUsername = Number(formBelong.getFieldValue('isCrcAccount')) == 1 ? formBelong.getFieldValue('crcAccountUsername') : '' + put({ + messageApi, + url: `/api/proj-owner/update/${projOwnerId}`, + body: { + crcAccountPassword: crcAccountPassword, + crcAccountUsername: crcAccountUsername, + idCardNo: formBelong.getFieldValue('authorIdCard'), + idCardType: formBelong.getFieldValue('authorIdCardType'), + isCrcAccount: Number(formBelong.getFieldValue('isCrcAccount')), + name: formBelong.getFieldValue('authorName'), + nameEn: formBelong.getFieldValue('nameEn') || '', + provinceCity: formBelong.getFieldValue('authorProvince').join(','), + type: formBelong.getFieldValue('authorType'), + }, + onBefore() { + }, + onSuccess() { + // console.log(data); + // alert('编辑成功') + messageApi.open({ + type: 'success', + content: '编辑成功' + }) + getProjOwnerList() + + setIsNewBelongOpen(false) + + }, + onFinally() { + } + }) + } + // 创建所属者 + const newProjOwner = () => { + const crcAccountPassword = Number(formBelong.getFieldValue('isCrcAccount')) == 1 ? formBelong.getFieldValue('crcAccountPassword') : '' + const crcAccountUsername = Number(formBelong.getFieldValue('isCrcAccount')) == 1 ? formBelong.getFieldValue('crcAccountUsername') : '' + post({ + messageApi, + url: '/api/proj-owner/save', + body: { + crcAccountPassword: crcAccountPassword, + crcAccountUsername: crcAccountUsername, + idCardNo: formBelong.getFieldValue('authorIdCard'), + idCardType: formBelong.getFieldValue('authorIdCardType'), + isCrcAccount: Number(formBelong.getFieldValue('isCrcAccount')), + name: formBelong.getFieldValue('authorName'), + nameEn: formBelong.getFieldValue('nameEn'), + provinceCity: formBelong.getFieldValue('authorProvince').join(','), + type: formBelong.getFieldValue('authorType'), + }, + onBefore() { + + }, + onSuccess() { + messageApi.success('提交成功') + getProjOwnerList() + + setIsNewBelongOpen(false) + + }, + onFinally() { + } + }) + } + // 客服二维码 + const [imgUrl, setImgUrl] = useState('') + + // 点击创建联系热人获取随机客服 + const getCas = () => { + get({ + messageApi, + url: `/api/csa/get`, + onSuccess({ data }: AxiosResponse) { + console.log('随机客服信息二维码', data.casQrCode); + formContact.setFieldsValue({ + csaNo: data.csaNo + }); + if (data.casQrCode) { + const imgUrl = downloadUrl(data.casQrCode); + console.log('图片地址', imgUrl); + setImgUrl(imgUrl) + } } }) + } + // 创建联系人 + const newContact = () => { + post({ + messageApi, + url: '/api/proj-contact/save', + body: { + csaNo: formContact.getFieldValue('csaNo'), + name: formContact.getFieldValue('name'), + phone: formContact.getFieldValue('phone'), + email: formContact.getFieldValue('email'), + }, + onBefore() { + }, + onSuccess() { + messageApi.success('提交成功') + getProjContactList() + steIsContantOpen(false) + }, + onFinally() { + } + }) + } + // 编辑联系人 + const upContact = () => { + put({ + messageApi, + url: `/api/proj-contact/update/${contactId}`, + body: { + csaNo: formContact.getFieldValue('csaNo'), + name: formContact.getFieldValue('name'), + phone: formContact.getFieldValue('phone'), + email: formContact.getFieldValue('email'), + }, + onBefore() { + }, + onSuccess() { + // console.log(data); + // alert('编辑成功') + messageApi.open({ + type: 'success', + content: '编辑成功' + }) + getProjContactList() + steIsContantOpen(false) + + }, + onFinally() { + } + }) + } + useEffect(() => { + getEditstep() + getProjOwnerList() + getProjContactList() listArea('0').then(data => { const options: Option[] = data.map(item => { return { @@ -237,6 +433,7 @@ export default function ProjEditStep2() { }) setAreaArray(options); }); + }, []) return ( @@ -328,19 +525,6 @@ export default function ProjEditStep2() {
- {/* - - label="开发完成时间" - name="projDevCompleteDate" - rules={[{ required: true, message: '请输入开发完成时间' }]} - > - - - */}
* 公司名称:
@@ -360,16 +544,6 @@ export default function ProjEditStep2() { - {/* - - label="公司名称" - name="companyName" - extra="公司名称在操作手册中引用" - rules={[{ required: true, message: '请输入公司名称' }]} - > - - - */}
* 公司英文名称:
@@ -413,19 +587,22 @@ export default function ProjEditStep2() { { @@ -439,7 +616,11 @@ export default function ProjEditStep2() { ]} defaultValue="code1" /> -
+
*/} +
+
+
当前所属者:
+
{authorName}/{authorIdCardType}/{authorIdCard}
{/* 表格 */} @@ -447,53 +628,84 @@ export default function ProjEditStep2() { - - - - + + ( + record.type === 'PERSONAL' ? '自然人' : '企业/组织' + )} + /> + ( + record.idCardType === 'ID_CARD' ? '身份证' : '营业执照' + )} + /> + {/* */} ( { + // alert(record.projOwnerId); + console.log('text:', text); console.log('record:', record); - + setProjOwnerId(record.projOwnerId) setbelongTitle('编辑所属者') setIsNewBelongOpen(true) // 发起请求给formBelong 表单赋值 formBelong.setFieldsValue({ // 公司名 - authorName: '嘻嘻', + authorName: record.name, + // 公司英文名 + nameEn: record.nameEn, // 证件类型 - authorIdCardType: 'BUSINESS_LICENSE', + authorIdCardType: record.idCardType ? record.idCardType : 'BUSINESS_LICENSE', // 证件号 - authorIdCard: '12345678', + authorIdCard: record.idCardNo, // 国籍 - authorNation: '中国', + // authorNation: '中国', // 地区 - authorProvince: '', + authorProvince: record.provinceCity ? record.provinceCity.split(',') : '', // 成立日期 - authorEstablishDate: '', + // authorEstablishDate: record.gmtCreate ? dayjs(record.gmtCreate, 'YYYY-MM-DD') : '', + // 是否提供平台账号 + isCrcAccount: record.isCrcAccount == 1 ? '1' : '0', + // 个人/企业 + authorType: record.type, + // 密码 + crcAccountPassword: record.crcAccountPassword, + // 账号 + crcAccountUsername: record.crcAccountUsername }) }}>编辑 | { - alert('删除' + record.key) + // alert(record.projOwnerId); + del({ + messageApi, + url: `/api/proj-owner/remove/${record.projOwnerId}`, + onSuccess() { + messageApi.success('删除成功'); + getProjOwnerList() + } + }) }}>删除 | { @@ -502,17 +714,27 @@ export default function ProjEditStep2() { // 发起请求给formBelong 表单赋值 formBelong.setFieldsValue({ // 公司名 - authorName: '查看', + authorName: record.name, + // 公司英文名 + nameEn: record.nameEn, // 证件类型 - authorIdCardType: 'BUSINESS_LICENSE', + authorIdCardType: record.idCardType ? record.idCardType : 'BUSINESS_LICENSE', // 证件号 - authorIdCard: '12345678', + authorIdCard: record.idCardNo, // 国籍 - authorNation: '中国', + // authorNation: '中国', // 地区 - authorProvince: '', + authorProvince: record.provinceCity ? record.provinceCity.split(',') : '', // 成立日期 - authorEstablishDate: '', + // authorEstablishDate: record.gmtCreate ? dayjs(record.gmtCreate, 'YYYY-MM-DD') : '', + // 是否提供平台账号 + isCrcAccount: record.isCrcAccount == 1 ? '1' : '0', + // 个人/企业 + authorType: record.type, + // 密码 + crcAccountPassword: record.crcAccountPassword, + // 账号 + crcAccountUsername: record.crcAccountUsername }) }}>查看 @@ -533,7 +755,10 @@ export default function ProjEditStep2() {
- {/* 表格 */} + {/* 表格 lyp*/}
- - - - + + + + {/* */} ( { - alert(text) + // alert(record.projOwnerId); + console.log('text:', text); + console.log('record:', record); + + setContactId(record.projContactId) + setContactTitle('编辑联系人') + steIsContantOpen(true) + // formContact 表单赋值 + formContact.setFieldsValue({ + csaNo: record.csaNo, + name: record.name, + phone: record.phone, + email: record.email + }) }}>编辑 | - { alert(record.key) }}>查看 + { + // alert(record.projOwnerId); + del({ + messageApi, + url: `/api/proj-contact/remove/${record.projContactId}`, + onSuccess() { + messageApi.success('删除成功'); + getProjContactList() + } + }) + }}>删除 + | + { + setContactTitle('查看联系人') + steIsContantOpen(true) + formContact.setFieldsValue({ + csaNo: record.csaNo, + name: record.name, + phone: record.phone, + email: record.email + + }) + }}>查看 + )} />
+
@@ -615,7 +876,7 @@ export default function ProjEditStep2() { open={isEditModalOpen} onOk={() => { // 美哟u创建所属者 应该还得判断一下没选中所属者 - if (data.length == 0) { + if (tableBelongData.length == 0) { // alert('所属者不能为空') messageApi.open({ type: 'error', @@ -630,14 +891,16 @@ export default function ProjEditStep2() { content: '申请人不能为空' }) setIsEditModalOpen(false); - } else if (selectedKeys.length == 0) { - messageApi.open({ - type: 'error', - content: '请选择所属者' - }) - setIsEditModalOpen(false); + } + // else if (selectedKeys.length == 0) { + // messageApi.open({ + // type: 'error', + // content: '请选择所属者' + // }) + // setIsEditModalOpen(false); - } else { + // } + else { setIsEditModalOpen(false); put({ messageApi, @@ -663,30 +926,7 @@ export default function ProjEditStep2() { } }) } - // setIsEditModalOpen(false); - // put({ - // messageApi, - // url: `/api/proj/update/edit-step2/${pathParams.projId}`, - // body: { - // projSubName: form.getFieldValue('projSubName'), - // projVersion: form.getFieldValue('projVersion'), - // projDevCompleteDate: dayjs(form.getFieldValue('projDevCompleteDate')).format(dateFormat), - // companyName: form.getFieldValue('companyName'), - // companyNameEn: form.getFieldValue('companyNameEn'), - // }, - // onBefore() { - // setLoading(true); - // }, - // onSuccess() { - // messageApi.open({ - // type: 'success', - // content: '编辑成功' - // }) - // }, - // onFinally() { - // setLoading(false); - // } - // }) + }} onCancel={() => { setIsEditModalOpen(false); @@ -695,7 +935,7 @@ export default function ProjEditStep2() { - {/* 选择创建所属者 */} + {/* 选择创建/编辑/查看所属者弹框 */} { setIsNewBelongOpen(false) }} + onCancel={() => { + setIsNewBelongOpen(false) + }} >
@@ -725,116 +967,247 @@ export default function ProjEditStep2() { layout="vertical" labelCol={{ span: 8 }} wrapperCol={{ span: 24 }} - style={{ width: '800px' }} + style={{ width: '100%' }} onFinish={() => { // setIsNewBelongOpen(true); }} autoComplete="off" > + + +
+
请选择知识产权所属者类型:
+ + + + 企业/组织 + 自然人 + + +
+ +
+ - - label="姓名或公司名称" - name="authorName" - rules={[{ required: true, message: '请输入姓名或公司名称' }]} - > - - +
+
姓名或公司名称:
+ + + // label="姓名或公司名称" + name="authorName" + rules={[{ required: true, message: '请输入姓名或公司名称' }]} + > + + +
+ - - label="成立日期" - name="authorEstablishDate" - rules={[{ required: true, message: '请选择成立日期' }]} - > - +
公司英文名:
+ + + // label="公司英文名" + name="nameEn" + rules={[{ required: true, message: '请输入公司英文名' }]} + > + + +
+ + + + + + + +
+
请选择证件类型:
+ + + // label="证件类型" + name="authorIdCardType" + rules={[{ required: true, message: '请选择证件类型' }]} + > + + +
- /> -
- - label="证件类型" - name="authorIdCardType" - rules={[{ required: true, message: '请选择证件类型' }]} - > - - - - - - - - label="国籍" - name="authorNation" - rules={[{ required: true, message: '请选择国籍' }]} - > - + + + +
中国版权登记业务平台密码
+ + // label="中国版权登记业务平台密码" + name="crcAccountPassword" + rules={[ + ({ getFieldValue }) => ({ + validator(_, value) { + if (getFieldValue('isCrcAccount') === '1') { + if (!value) { + return Promise.reject('请输入密码'); + } + } + return Promise.resolve(); + }, + }), + ]} + + > + @@ -844,7 +1217,124 @@ export default function ProjEditStep2() {
-
+ + + + {/* 选择创建/编辑/查看联系人弹框 lyp*/} + { + // }} + onOk={ + contactHandleOk + } + width={745} + // 确认按钮样式 + okButtonProps={{ style: { width: '102px', height: '49px', background: '#FFBA00', fontSize: '18px', color: '#FFFFFF', display: contactTitle == '查看联系人' ? 'none' : 'block' } }} + // 返回按钮样式 + cancelButtonProps={{ style: { border: 'none', width: '102px', height: '49px', background: '#F3F3F3', fontSize: '18px', color: '#8C8C8C' } }} + + onCancel={() => { + steIsContantOpen(false) + }} + > +
+
+ {contactTitle} +
+
+
+
{ + // setIsNewBelongOpen(true); + }} + autoComplete="off" + > +
+
姓名:
+ + + + name="name" + rules={[{ required: true, message: '请输入姓名' }]} + > + + +
+
+
电话:
+ + + name="phone" + rules={[{ required: true, message: '请输入电话号码' }]} + > + + +
+
+
邮箱:
+ + + name="email" + rules={[{ required: true, message: '请输入邮箱' }, + { type: 'email', message: '请输入有效的邮箱地址' } + ]} + > + + +
+
+ + name="csaNo" + > + + +
+
+
+
+
+ 请使用微信扫一扫 +
+
+ 添加您的专属客服 +
+ +
+
+
+ +
diff --git a/src/route/proj/edit/ProjEditStep4.tsx b/src/route/proj/edit/ProjEditStep4.tsx index 2a2b268..1e177d7 100644 --- a/src/route/proj/edit/ProjEditStep4.tsx +++ b/src/route/proj/edit/ProjEditStep4.tsx @@ -60,6 +60,8 @@ export default function ProjEditStep4() { messageApi, url: `/api/proj/get/edit-step4/${pathParams.projId}`, onSuccess({data}: AxiosResponse) { + console.log(data); + form.setFieldsValue({ authorName: data.authorName, authorIdCardType: data.authorIdCardType ? data.authorIdCardType : 'BUSINESS_LICENSE', diff --git a/src/route/proj/edit/proj-edit-step.css b/src/route/proj/edit/proj-edit-step.css index c1169af..e164a2e 100644 --- a/src/route/proj/edit/proj-edit-step.css +++ b/src/route/proj/edit/proj-edit-step.css @@ -108,6 +108,14 @@ } +/* 创建/编辑/查看所属人 弹窗 */ + +/* 弹窗底部按钮 */ +.css-dev-only-do-not-override-1ae8k9u.ant-modal .ant-modal-footer { + display: flex; + justify-content: flex-end; +} + .belongPeople-Modal {} .belongPeople-Mtop { @@ -117,10 +125,99 @@ color: #222222; border-bottom: 1px solid #EFEFEE; /* display: block; */ + padding-bottom: 8px; + /* box-sizing: border-box; */ } - -.css-dev-only-do-not-override-1ae8k9u.ant-modal .ant-modal-footer{ +.blongNameInt { display: flex; - justify-content: flex-end; + align-items: center; + /* background-color: #E6E6E6; */ + font-weight: 700; + font-size: 15px; + color: #222222; + height: 50px; + margin-top: 40px; +} + +.blongSmallNamel { + margin-left: 100px; + /* height: 44px; */ + /* background-color: red; */ + margin-top: 10px; + +} + +.blongsmallTitle { + width: 132px; + text-align: end; + /* background-color: #555555; */ + margin-right: 10px; +} + +.blongSmallNameR { + margin-left: 17px; + margin-top: 10px; +} + +.belongText { + width: 1170px; + height: 51px; + background: #e0e6f1; + /* text-indent: 23px; */ +} + +.belongRedText { + width: 1170px; + + font-weight: 400; + font-size: 14px; + color: #FF7979; + padding: 10px; + /* background-color: red; */ + box-sizing: border-box; +} + +.crcAccount { + font-family: PingFang SC; + font-weight: 700; + font-size: 15px; + color: #222222; + /* background-color: red; */ + margin-left: 10px; + margin-top: 18px; +} + +.contact-modal-context { + display: flex; + /* padding: 62px 44px 50px 42px; */ + margin-left: 20px; +} + +.cas { + display: flex; + margin-left: 57px; + margin-top: 44px; +} + +.cas-title { + font-family: PingFang SC; + font-weight: 700; + font-size: 17px; + color: #222222; + line-height: 31px; + /* background-color: #CC0000; */ + text-align: center; +} + +.cas-text { + font-family: PingFang SC; + font-weight: 500; + font-size: 13px; + color: #222222; + line-height: 31px; + /* background-color: #85cc00; */ + text-align: center; + + } \ No newline at end of file