This commit is contained in:
xixi 2024-05-29 14:43:48 +08:00
parent 6a977019f2
commit ceef8a5e88
11 changed files with 265 additions and 152 deletions

View File

@ -206,6 +206,7 @@ export default function ProjConfigLoginpage(props:any) {
type="default"
className='seeButton' onClick={() => {
props.closeModal()
// window.location.reload()
}}></Button>
<Button
type="primary"
@ -559,6 +560,10 @@ export default function ProjConfigLoginpage(props:any) {
content: '编辑成功'
})
// props.closeModal()
props.closeModal()
setTimeout(() => {
window.location.reload()
}, 500)
},
onFinally() {

View File

@ -477,6 +477,7 @@ export default function CardProj(props: { item: IProj }) {
onCancel={() => {
setLoginPageOpne(false);
// window.location.reload(); // 在取消时刷新页面
}}
footer={null}
@ -490,6 +491,7 @@ export default function CardProj(props: { item: IProj }) {
onCancel={() => {
setLoginPageShowOpne(false);
}}
footer={null}
@ -503,7 +505,7 @@ export default function CardProj(props: { item: IProj }) {
onCancel={() => {
setSoftwareManagementOpen(false);
window.location.reload(); // 在取消时刷新页面
// window.location.reload(); // 在取消时刷新页面
}}
footer={null}
>

View File

@ -4,7 +4,7 @@ import { MouseEvent, Reducer, useEffect, useReducer, useState } from "react";
import { useNavigate, useSearchParams, Outlet } from "react-router-dom";
import { IMenuListItem, IMenuWithTopButton } from "../../interfaces/menu/IMenuWithTopButton.ts";
import MenuWithTopButton from "../../components/menu/MenuWithTopButton.tsx";
import MenuWithBottomButtom from '../../components/menu/MenuWithBottomButton.tsx'
// import MenuWithBottomButtom from '../../components/menu/MenuWithBottomButton.tsx'
import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
// import ListProj from "../../components/list/ListProj.tsx";
// import ListProjAgent from "../../components/list/ListProjAgent.tsx";
@ -313,7 +313,7 @@ export default function Index() {
list={agentMenu.list}
handleListItem={agentMenu.handleListItem}
/> */}
<MenuWithBottomButtom
{/* <MenuWithBottomButtom
button={sellMenu.button}
list={sellMenu.list}
handleListItem={sellMenu.handleListItem}
@ -322,7 +322,7 @@ export default function Index() {
button={buyMenu.button}
list={buyMenu.list}
handleListItem={buyMenu.handleListItem}
/>
/> */}
</div>
<div className="right">
<div>

View File

@ -512,6 +512,7 @@ export default function ProjEdit() {
</div>
<FloatButton.Group>
<FloatButton
shape="square" //报错处理 lyp
onClick={() => { setAiHelperModalOpen(true) }}
description={<span style={{ fontWeight: 'bold' }}>AI</span>}
>AI助手</FloatButton>
@ -585,7 +586,12 @@ export default function ProjEdit() {
width={1500}
onCancel={() => {
setTitleIntroductionOpen(false);
setTimeout(() => {
window.location.reload()
}, 500)
}}
footer={null}
>
@ -610,6 +616,13 @@ export default function ProjEdit() {
onCancel={() => {
setSoftwareOpen(false);
// setTimeout(() => {
// props.closeModal()
// window.location.reload(); // 刷新页面
// }, 1000);
setTimeout(() => {
window.location.reload()
}, 500)
}}
footer={null}
>
@ -634,6 +647,10 @@ export default function ProjEdit() {
onCancel={() => {
setSoftwareFeaturesOpen(false);
setTimeout(() => {
window.location.reload()
}, 500)
}}
footer={null}
>
@ -658,6 +675,10 @@ export default function ProjEdit() {
onCancel={() => {
setLoginPageOpne(false);
setTimeout(() => {
window.location.reload()
}, 500)
}}
footer={null}
>

View File

@ -1,6 +1,6 @@
import './proj-new.css';
import { useNavigate, useParams, useSearchParams } from "react-router-dom";
import { Button, Flex, Form, Input, message, Modal, Spin } from "antd";
import { Button, Flex, Form, Input, message, Modal, Spin, Checkbox } from "antd";
import { useContext, useEffect, useState } from "react";
import { get, post } from "../../util/AjaxUtils.ts";
import { IProjCharge, ProjAdditionalType, ProjChargeType } from "../../interfaces/proj/IProj.ts";
@ -117,12 +117,28 @@ export default function ProjNew() {
autoComplete="off"
>
<div className='formItemOne'>
<div className='formItem-title oneTitle'>*</div>
<div className='formItem-title oneTitle'>*</div>
<Form.Item<ProjInfo>
name="projName"
rules={[{ required: true, message: '请输入系统标题' }]}
rules={[{ required: true, message: '请输入系统全称' }]}
>
<Input style={{ background: '#eeeeee', width: '1000px', height: '50px' ,fontSize:'16px'}} placeholder="请输入系统标题" />
<Input style={{ background: '#eeeeee', width: '1000px', height: '50px', fontSize: '16px' }} placeholder="请输入系统全称" />
</Form.Item>
</div>
<div className='software-protocol'>
<Form.Item
name="agreement"
valuePropName="checked"
rules={[
{
validator: (_, value) =>
value ? Promise.resolve() : Promise.reject(new Error('请阅读并勾选《软件委托开发协议》')),
},
]}
>
<Checkbox>
<a href="https://www.aimzhu.com/Seda.html"></a>
</Checkbox>
</Form.Item>
</div>
{/* <div className='formItemTwo'>
@ -133,7 +149,7 @@ export default function ProjNew() {
<TextArea rows={10} style={{ background: '#eeeeee', resize: 'none',width:"328px",height:'220px',fontSize:'16px' }} placeholder="请对系统作出简单的描述,以使可准确生成资料..." />
</Form.Item>
</div> */}
<div style={{ marginTop: '20px' }}>
<div style={{ marginTop: '' }}>
<Form.Item>
<Flex align="center" justify="center" gap="large">
<Button

View File

@ -204,6 +204,10 @@ export default function ProjConfigLoginpage(props:any) {
type="default"
className='seeButton' onClick={() => {
props.closeModal()
setTimeout(()=>{
window.location.reload()
},500)
}}></Button>
<Button
type="primary"
@ -557,6 +561,10 @@ export default function ProjConfigLoginpage(props:any) {
content: '编辑成功'
})
// props.closeModal()
props.closeModal()
setTimeout(()=>{
window.location.reload()
},500)
},
onFinally() {

View File

@ -219,9 +219,9 @@ export default function ProjConfigModList(props: PropType) {
<ConfigModSave
projId={projId}
closeModal={() => {
renderData()
setConfigModSaveOpen(false)
renderData()
}}></ConfigModSave>
</Modal>

View File

@ -24,7 +24,7 @@ export default function ProjEditStep1(props:any) {
const [loading, setLoading] = useState<boolean>(false);
const [isEditModalOpen, setIsEditModalOpen] = useState(false);
const height = window.innerHeight - 200
// 初始化表格数据
useEffect(() => {
get({
messageApi,
@ -179,6 +179,9 @@ export default function ProjEditStep1(props:any) {
size='large'
onClick={() => {
props.closeModal()
setTimeout(() => {
window.location.reload()
}, 500); // 刷新页面
}}>
</Button>
@ -221,7 +224,11 @@ export default function ProjEditStep1(props:any) {
type: 'success',
content: '编辑成功'
})
// props.closeModal()
setTimeout(() => {
props.closeModal()
window.location.reload(); // 刷新页面
}, 1000);
},
onFinally() {
setLoading(false);

View File

@ -21,6 +21,7 @@ type FieldType = {
projDevCompleteDate: Dayjs;
companyName: string;
companyNameEn: string;
projName:string
};
// 所属人信息类型
type BelongPeopleType = {
@ -238,6 +239,7 @@ export default function ProjEditStep2(props:any) {
messageApi,
url: `/api/proj/get/edit-step2/${pathParams.projId}`,
onSuccess({ data }: AxiosResponse) {
// 获取默认所属人信息
setauthorName(data.authorName)
@ -261,6 +263,7 @@ export default function ProjEditStep2(props:any) {
setAuthorId(data.authorId)
setApplyConcatId(data.applyContactId)
formInfo.setFieldsValue({
projName : data.projName,
projSubName: data.projSubName,
projVersion: data.projVersion,
projDevCompleteDate: data.projDevCompleteDate ? dayjs(data.projDevCompleteDate, 'YYYY-MM-DD') : '',
@ -320,6 +323,7 @@ export default function ProjEditStep2(props:any) {
}
})
}
const [belongShow, setBelongShow] = useState('')
// 编辑所属者
const upProjOwner = () => {
const crcAccountPassword = Number(formBelong.getFieldValue('isCrcAccount')) == 1 ? formBelong.getFieldValue('crcAccountPassword') : ''
@ -331,7 +335,8 @@ export default function ProjEditStep2(props:any) {
crcAccountPassword: crcAccountPassword,
crcAccountUsername: crcAccountUsername,
idCardNo: formBelong.getFieldValue('authorIdCard'),
idCardType: formBelong.getFieldValue('authorIdCardType'),
// idCardType: formBelong.getFieldValue('authorIdCardType'),
idCardType: belongShow == 'PERSONAL' ? 'ID_CARD' : 'BUSINESS_LICENSE',
isCrcAccount: Number(formBelong.getFieldValue('isCrcAccount')),
name: formBelong.getFieldValue('authorName'),
nameEn: formBelong.getFieldValue('nameEn') || '',
@ -367,7 +372,8 @@ export default function ProjEditStep2(props:any) {
crcAccountPassword: crcAccountPassword,
crcAccountUsername: crcAccountUsername,
idCardNo: formBelong.getFieldValue('authorIdCard'),
idCardType: formBelong.getFieldValue('authorIdCardType'),
// idCardType: formBelong.getFieldValue('authorIdCardType'),
idCardType: belongShow == 'PERSONAL' ? 'ID_CARD' : 'BUSINESS_LICENSE',
isCrcAccount: Number(formBelong.getFieldValue('isCrcAccount')),
name: formBelong.getFieldValue('authorName'),
nameEn: formBelong.getFieldValue('nameEn'),
@ -462,11 +468,15 @@ export default function ProjEditStep2(props:any) {
}
})
}
const [belongShow, setBelongShow] = useState('')
const typeChange = (data: any) => {
// console.log(data.target.value);
setBelongShow(data.target.value)
}
const [CrcAccountShow,setCrcAccountShow] = useState('0')
const isCrcAccountChange = (data:any) => {
// console.log(data.target.value);
setCrcAccountShow(data.target.value)
}
useEffect(() => {
getEditstep()
@ -528,9 +538,24 @@ export default function ProjEditStep2(props:any) {
>
<Row gutter={15}>
<div className='projNameInt'>
<div style={{ display: 'flex' }}>
<div className='projTitle '> :</div>
<Form.Item
// label="项目简称"
name="projName"
rules={[{ required: false, message: '' }]}
>
<Input
style={{ height: '50px', width: '411px', fontSize: '16px' }}
readOnly
// value={}
/>
</Form.Item>
</div>
<div style={{ display: 'flex' }}>
<div className='projTitle '> :</div>
<div className='projTitle ' style={{ marginLeft: '112px' }}> :</div>
<Form.Item<FieldType>
// label="项目简称"
@ -543,23 +568,7 @@ export default function ProjEditStep2(props:any) {
placeholder="请输入项目简称" />
</Form.Item>
</div>
<div style={{ display: 'flex' }}>
<div className='projTitle ' style={{ marginLeft: '112px' }}><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="开发完成时间"
name="projDevCompleteDate"
rules={[{ required: true, message: '请输入开发完成时间' }]}
>
<DatePicker placeholder="请选择开发完成日期"
format={dateFormat}
locale={locale}
// style={{ width: '100%' }}
style={{ height: '50px', width: '411px', fontSize: '16px' }}
/>
</Form.Item>
</div>
</div>
@ -579,8 +588,24 @@ export default function ProjEditStep2(props:any) {
placeholder="请输入项目版本" />
</Form.Item>
</div>
<div style={{ display: 'flex' }}>
<div className='projTitle ' style={{ marginLeft: '112px' }}><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="开发完成时间"
name="projDevCompleteDate"
rules={[{ required: true, message: '请输入开发完成时间' }]}
>
<DatePicker placeholder="请选择开发完成日期"
format={dateFormat}
locale={locale}
// style={{ width: '100%' }}
style={{ height: '50px', width: '411px', fontSize: '16px' }}
/>
</Form.Item>
</div>
<div style={{ display: 'none' }}>
<div className='projTitle ' style={{ marginLeft: '112px' }}>:</div>
<Input
readOnly
@ -593,7 +618,7 @@ export default function ProjEditStep2(props:any) {
</Row>
<Row gutter={15}>
<div style={{ display: 'flex' }}>
<div style={{ display: 'none' }}>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Input
readOnly
@ -612,12 +637,13 @@ export default function ProjEditStep2(props:any) {
<div style={{ padding: '22px 15px' }}>
<div style={{ padding: '14px 19px', background: '#F3F3F3', color: '#A3A3A3', fontSize: '14px' }}>
<span style={{ color: '#FDB33E' }}></span>
<a href="https://www.aimzhu.com/RealName.html" style={{ color: '#FDB33E' }}></a>
</div>
<div className='belongPeople-center'>
<Button onClick={() => {
// lyp
setBelongShow('')
setCrcAccountShow('0')
// 先初始化数据
formBelong.resetFields()
setIsNewBelongOpen(true)
@ -709,6 +735,7 @@ export default function ProjEditStep2(props:any) {
render={(text, record: any) => (
<Space size="middle">
<a onClick={() => {
// alert(record.projOwnerId);
console.log('text:', text);
@ -719,6 +746,7 @@ export default function ProjEditStep2(props:any) {
setBelongShow(record.type)
setIsNewBelongOpen(true)
// 发起请求给formBelong 表单赋值
setCrcAccountShow(record.isCrcAccount == 1 ? '1' : '0')
formBelong.setFieldsValue({
// 公司名
authorName: record.name,
@ -904,6 +932,9 @@ export default function ProjEditStep2(props:any) {
<Flex align="center" justify="center" gap="large">
<Button type="default" htmlType="button" onClick={() => {
props.closeModal()
setTimeout(() => {
window.location.reload()
}, 500)
// alert('发挥')
}}
// style={{ height: '49px', width: '104px', color: '#4B4B4B', background: '#D1D1D1', fontSize: '16px' }}
@ -922,6 +953,7 @@ export default function ProjEditStep2(props:any) {
// 这里可以放置你的确认操作逻辑
setIsEditModalOpen(true)
}).catch(() => {
// 如果验证不通过,可以根据需要处理错误信息
messageApi.open({
@ -1014,6 +1046,10 @@ export default function ProjEditStep2(props:any) {
content: '编辑成功'
})
// props.closeModal()
props.closeModal()
setTimeout(() => {
window.location.reload()
}, 500)
},
onFinally() {
@ -1132,9 +1168,9 @@ export default function ProjEditStep2(props:any) {
<Form.Item<BelongPeopleType>
// label="公司英文名"
name="nameEn"
rules={[{ required: true, message: '请输入公司英文名' }]}
rules={[{ required: true, message: belongShow == 'PERSONAL' ? '请输入英文名' : '请输入公司英文名' }]}
>
<Input placeholder="请输入公司英文名"
<Input placeholder={belongShow == 'ORGANIZATION' ? '请输入公司英文名称' : '请输入英文名'}
style={{ height: '44px', width: '384px', fontSize: '15px', marginTop: '22px' }}
disabled={belongTitle == '查看所属者' ? true : false}
/>
@ -1146,14 +1182,12 @@ export default function ProjEditStep2(props:any) {
</Row>
<Row gutter={15}>
<Col span={12}>
<div className='blongNameInt blongSmallNamel'>
<div className='blongNameInt blongSmallNamel' style={{ display: 'none' }}>
<div className='blongTitle blongsmallTitle '>:</div>
<Form.Item<BelongPeopleType>
// label="证件类型"
name="authorIdCardType"
rules={[{ required: true, message: '请选择证件类型' }]}
>
<Select
style={{ height: '44px', width: '384px', fontSize: '15px', marginTop: '22px' }}
@ -1166,17 +1200,16 @@ export default function ProjEditStep2(props:any) {
{ value: 'ID_CARD', label: '身份证' },
]}
disabled={belongTitle == '查看所属者' ? true : false}
/>
</Form.Item>
</div>
</Col>
<Col span={12}>
<div className='blongNameInt blongSmallNameR'>
<div className='blongTitle blongsmallTitle '>:</div>
<div className='blongNameInt blongSmallNamel'>
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '身份证号' : '营业执照号'}:</div>
<Form.Item<BelongPeopleType>
// label="证件号"
@ -1254,7 +1287,9 @@ export default function ProjEditStep2(props:any) {
style={{ marginTop: '22px', marginLeft: '24px' }}
>
<Radio.Group disabled={belongTitle == '查看所属者' ? true : false}>
<Radio.Group
onChange={isCrcAccountChange}
disabled={belongTitle == '查看所属者' ? true : false}>
<Radio value="1"> </Radio>
<Radio value="0"> </Radio>
</Radio.Group>
@ -1274,6 +1309,7 @@ export default function ProjEditStep2(props:any) {
</Row>
<Row gutter={15}>
<Col span={12}>
<div style={{display:CrcAccountShow=='0'?'none':'block'}}>
<div className='crcAccount'></div>
<Form.Item<BelongPeopleType>
// label="中国版权登记业务平台用户名"
@ -1298,8 +1334,10 @@ export default function ProjEditStep2(props:any) {
disabled={belongTitle == '查看所属者' ? true : false}
/>
</Form.Item>
</div>
</Col>
<Col span={12}>
<div style={{display:CrcAccountShow=='0'?'none':'block'}}>
<div className='crcAccount'></div>
<Form.Item<BelongPeopleType>
// label="中国版权登记业务平台密码"
@ -1323,6 +1361,7 @@ export default function ProjEditStep2(props:any) {
disabled={belongTitle == '查看所属者' ? true : false}
/>
</Form.Item>
</div>
</Col>
</Row>
</Form>

View File

@ -275,6 +275,9 @@ export default function ProjEditStep3(props:any) {
size='large'
onClick={()=>{
props.closeModal()
setTimeout(()=>{
window.location.reload()
},500)
}}>
</Button>
@ -319,6 +322,10 @@ export default function ProjEditStep3(props:any) {
content: '编辑成功'
})
// props.closeModal()
props.closeModal()
setTimeout(()=>{
window.location.reload()
},500)
},
onFinally() {
setLoading(false);

View File

@ -56,4 +56,12 @@
/* background-color: red; */
/* width: 410px */
}
.software-protocol{
font-family: Microsoft YaHei UI;
/* font-weight: bold; */
/* background-color: red; */
color: #474747;
margin-top: 12px;
margin-left: 116px;
}