版本更新

This commit is contained in:
lyp 2025-03-28 09:44:48 +08:00
parent abebaf54e7
commit 458ae8efaf
22 changed files with 1230 additions and 451 deletions

View File

@ -1,3 +1,4 @@
// 引入Provider // 引入Provider
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
// 引入仓库 // 引入仓库
@ -12,10 +13,14 @@ import {
GlobalDataActionType, GlobalDataActionType,
GlobalDispatchContext, GlobalDispatchContext,
} from "./context/GlobalContext.ts"; } from "./context/GlobalContext.ts";
import React, { Reducer, useReducer } from "react"; import React, { Reducer, useReducer, useState, useEffect } from "react";
import {
message
} from 'antd';
import { get } from "./util/AjaxUtils.ts";
const App: React.FC = () => { const App: React.FC = () => {
const [isTokenFetched, setIsTokenFetched] = useState(false);
const globalDataReducer = (state: GlobalData, action: GlobalDataAction) => { const globalDataReducer = (state: GlobalData, action: GlobalDataAction) => {
if (action.type == GlobalDataActionType.REFRESH_SELF) { if (action.type == GlobalDataActionType.REFRESH_SELF) {
if (action.user) { if (action.user) {
@ -39,20 +44,58 @@ const App: React.FC = () => {
hasUserInfo: false hasUserInfo: false
} }
}); });
const [messageApi] = message.useMessage();
// const nav = useNavigate();
useEffect(() => {
get<any>({
messageApi,
url: '/api/user-info/get-user-self',
onSuccess({ data }: any) {
// const currentToken = sessionStorage.getItem('token');
sessionStorage.setItem('token', data.accessToken);
const token = sessionStorage.getItem('token');
if (token) {
// 若 token 存在,设置 isTokenFetched 为 true
setIsTokenFetched(true);
}
}
})
}, []);
// const token = sessionStorage.getItem('token');
// useEffect(() => {
// if (token) {
// setIsTokenFetched(true)
// }
// }, [token]);
// 如果 token 还未获取,显示加载页面
// if (!isTokenFetched) {
// return (
// <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100vh' }}>
// <p>正在加载,请稍候...</p>
// </div>
// );
// }
if (isTokenFetched) {
return (
<div>
<Provider store={store}>
<GlobalContext.Provider value={globalData}>
<GlobalDispatchContext.Provider value={dispatch}>
<Head />
<Body />
{/* <Foot/> */}
</GlobalDispatchContext.Provider>
</GlobalContext.Provider>
</Provider>
</div>
);
}
return (
<div>
<Provider store={store}>
<GlobalContext.Provider value={globalData}>
<GlobalDispatchContext.Provider value={dispatch}>
<Head />
<Body />
{/* <Foot/> */}
</GlobalDispatchContext.Provider>
</GlobalContext.Provider>
</Provider>
</div>
);
}; };
export default App; export default App;

View File

@ -89,8 +89,8 @@ export default function BelongPeople(props: propsInfo) {
const [authorType, setauthorType] = useState('') //所属人类型 const [authorType, setauthorType] = useState('') //所属人类型
const [authorProvinceCity, setauthorProvinceCity] = useState('') //所属人省市 const [authorProvinceCity, setauthorProvinceCity] = useState('') //所属人省市
const [authorCrcAccount, setauthorCrcAccount] = useState(0) //是否给账号 0 给 1 不给 const [authorCrcAccount, setauthorCrcAccount] = useState(0) //是否给账号 0 给 1 不给
// const [authorCrcAccountPassword, setauthorCrcAccountPassword] = useState('') //密码 const [authorCrcAccountPassword, setauthorCrcAccountPassword] = useState('') //密码
// const [authorCrcAccountUsername, setauthorCrcAccountUsername] = useState('') //账号 const [authorCrcAccountUsername, setauthorCrcAccountUsername] = useState('') //账号
// // 从基本信息中获取到的两个表格默认选择的id 所属者id 联系人id // // 从基本信息中获取到的两个表格默认选择的id 所属者id 联系人id
const [authorId, setAuthorId] = useState('') //所属人id const [authorId, setAuthorId] = useState('') //所属人id
// 设置所属者more你选中的行 // 设置所属者more你选中的行
@ -146,8 +146,8 @@ export default function BelongPeople(props: propsInfo) {
// setauthorNameEn(''); // setauthorNameEn('');
setauthorProvinceCity(''); setauthorProvinceCity('');
setauthorCrcAccount(0); setauthorCrcAccount(0);
// setauthorCrcAccountPassword(''); setauthorCrcAccountPassword('');
// setauthorCrcAccountUsername(''); setauthorCrcAccountUsername('');
setAuthorId(''); setAuthorId('');
} else { } else {
// 正常选中时,更新相关状态 // 正常选中时,更新相关状态
@ -160,8 +160,8 @@ export default function BelongPeople(props: propsInfo) {
// setauthorNameEn(firstSelectedRow.nameEn); // setauthorNameEn(firstSelectedRow.nameEn);
setauthorProvinceCity(firstSelectedRow.provinceCity); setauthorProvinceCity(firstSelectedRow.provinceCity);
setauthorCrcAccount(firstSelectedRow.isCrcAccount); setauthorCrcAccount(firstSelectedRow.isCrcAccount);
// setauthorCrcAccountPassword(firstSelectedRow.crcAccountPassword); setauthorCrcAccountPassword(firstSelectedRow.crcAccountPassword);
// setauthorCrcAccountUsername(firstSelectedRow.crcAccountUsername); setauthorCrcAccountUsername(firstSelectedRow.crcAccountUsername);
setAuthorId(firstSelectedRow.projOwnerId); setAuthorId(firstSelectedRow.projOwnerId);
} }
@ -518,7 +518,7 @@ export default function BelongPeople(props: propsInfo) {
<div style={{ display: authorName ? 'block' : 'none' }}> <div style={{ display: authorName ? 'block' : 'none' }}>
{authorName}/{authorType == 'PERSONAL' ? '自然人' : '企业-组织'}/{authorIdCardType == 'ID_CARD' ? '身份证' : '营业执照'}/{authorIdCard} {authorName}/{authorType == 'PERSONAL' ? '自然人' : '企业-组织'}/{authorIdCardType == 'ID_CARD' ? '身份证' : '营业执照'}/{authorIdCard}
</div> </div>
<Button style={{ display: authorName ? 'block' : 'none', height: 30, marginLeft: 10 }} onClick={() => { {/* <Button style={{ display: authorName ? 'block' : 'none', height: 30, marginLeft: 10 }} onClick={() => {
// lyp // lyp
setauthorName(''); setauthorName('');
setauthorIdCardType(''); setauthorIdCardType('');
@ -527,8 +527,11 @@ export default function BelongPeople(props: propsInfo) {
setauthorProvinceCity(''); setauthorProvinceCity('');
setAuthorId(''); setAuthorId('');
setSelectedRowKeys([]); setSelectedRowKeys([]);
setauthorCrcAccount(0);
}}></Button> setauthorCrcAccountPassword('');
setauthorCrcAccountUsername('');
}}></Button> */}
</div> </div>
</>) : (<> </>) : (<>
<div style={{ display: 'flex', alignItems: 'center' }}> <div style={{ display: 'flex', alignItems: 'center' }}>
@ -544,9 +547,11 @@ export default function BelongPeople(props: propsInfo) {
authorType: '', authorType: '',
authorIdCardType: '', authorIdCardType: '',
authorIdCard: '', authorIdCard: '',
authorCrcAccount: '', authorCrcAccount: 0,
authorId: '', authorId: '',
authorProvinceCity: '' authorProvinceCity: '',
authorCrcAccountPassword: '',
authorCrcAccountUsername: '',
}) })
}}></Button> }}></Button>
@ -874,13 +879,17 @@ export default function BelongPeople(props: propsInfo) {
<div style={{ display: props.isShow ? 'block' : 'none' }}> <div style={{ display: props.isShow ? 'block' : 'none' }}>
<div className="belongPeopleModal-btn" style={{ display: 'flex', justifyContent: 'flex-end' }} > <div className="belongPeopleModal-btn" style={{ display: 'flex', justifyContent: 'flex-end' }} >
<Button onClick={() => { <Button onClick={() => {
props.closeModal() props.closeModal()
}}></Button> }}></Button>
<Button style={{ <Button style={{
marginLeft: 20 marginLeft: 20
}} type="primary" }} type="primary"
onClick={() => { onClick={() => {
if ( !authorName) {
messageApi.error('请选择所属者')
return
}
if (props.belongPeopleInfo.authorId && !authorId) { if (props.belongPeopleInfo.authorId && !authorId) {
props.closeModal() props.closeModal()
return return
@ -893,7 +902,9 @@ export default function BelongPeople(props: propsInfo) {
authorCrcAccount, authorCrcAccount,
authorId, authorId,
authorProvinceCity authorProvinceCity,
authorCrcAccountPassword,
authorCrcAccountUsername,
}) })
props.setValue(authorName) props.setValue(authorName)
props.closeModal() props.closeModal()
@ -989,7 +1000,11 @@ export default function BelongPeople(props: propsInfo) {
<Col span={12}> <Col span={12}>
<div className='blongNameInt blongSmallNamel promptBox'> <div className='blongNameInt blongSmallNamel promptBox'>
{/* <div className='blongTitle blongsmallTitle '>姓名或公司名称:</div> */} {/* <div className='blongTitle blongsmallTitle '>姓名或公司名称:</div> */}
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '姓名' : '公司名称'}</div> <div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '姓名' : '公司名称'}
<span style={{
color: 'red'
}}>*</span>
</div>
<Form.Item<BelongPeopleType> <Form.Item<BelongPeopleType>
// label="姓名或公司名称" // label="姓名或公司名称"
@ -1008,7 +1023,7 @@ export default function BelongPeople(props: propsInfo) {
</div> </div>
</Col> </Col>
<Col span={12}> {/* <Col span={12}>
<div className='blongNameInt blongSmallNameR'> <div className='blongNameInt blongSmallNameR'>
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '英文名' : '公司英文缩写'}</div> <div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '英文名' : '公司英文缩写'}</div>
@ -1031,8 +1046,30 @@ export default function BelongPeople(props: propsInfo) {
</Form.Item> </Form.Item>
</div> </div>
</Col> </Col> */}
<Col span={12}>
<div className='blongNameInt blongSmallNameR'>
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '身份证号' : '统一社会信用代码'}
<span style={{
color: 'red',
}}>*</span>
</div>
<Form.Item<BelongPeopleType>
// label="证件号"
name="authorIdCard"
rules={[{ required: true, message: '请输入证件号' }]}
>
<Input placeholder="请输入证件号"
style={{ height: '44px', width: '360px', fontSize: '15px', marginTop: '22px' }}
disabled={belongTitle == '查看所属者' ? true : false}
/>
</Form.Item>
<div className='prompt' style={{left:180}}>(:如有多个著作人{belongShow == 'PERSONAL' ? '身份证号' : '统一社会信用代码'})</div>
</div>
</Col>
</Row> </Row>
<Row gutter={15}> <Row gutter={15}>
@ -1061,7 +1098,7 @@ export default function BelongPeople(props: propsInfo) {
<Col span={12}> {/* <Col span={12}>
<div className='blongNameInt blongSmallNamel'> <div className='blongNameInt blongSmallNamel'>
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '身份证号' : '统一社会信用代码'}</div> <div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '身份证号' : '统一社会信用代码'}</div>
@ -1078,7 +1115,7 @@ export default function BelongPeople(props: propsInfo) {
</Form.Item> </Form.Item>
</div> </div>
</Col> </Col> */}
</Row></>} </Row></>}
<Row gutter={15}> <Row gutter={15}>

View File

@ -472,6 +472,7 @@ export default function ContactPeople(props: any) {
<Modal <Modal
destroyOnClose destroyOnClose
okText="确认" okText="确认"
centered
// cancelText="取消" // cancelText="取消"
cancelText={contactTitle === '查看联系人' ? '返回' : '取消'} cancelText={contactTitle === '查看联系人' ? '返回' : '取消'}
open={isContantOpen} open={isContantOpen}
@ -511,7 +512,9 @@ export default function ContactPeople(props: any) {
autoComplete="off" autoComplete="off"
> >
<div className='blongNameInt'> <div className='blongNameInt'>
<div className='blongTitle ' style={{ width: 65, marginRight: '15px' }}>: </div> <div className='blongTitle ' style={{ width: 65, marginRight: '15px' }}><span style={{
color: 'red',
}}>*</span> : </div>
<Form.Item<ContactType> <Form.Item<ContactType>
@ -526,7 +529,9 @@ export default function ContactPeople(props: any) {
</Form.Item> </Form.Item>
</div> </div>
<div className='blongNameInt'> <div className='blongNameInt'>
<div className='blongTitle ' style={{ width: 65, marginRight: '15px' }}>: </div> <div className='blongTitle ' style={{ width: 65, marginRight: '15px' }}><span style={{
color: 'red',
}}>*</span> : </div>
<Form.Item<ContactType> <Form.Item<ContactType>
name="phone" name="phone"

View File

@ -91,7 +91,7 @@ export default function ContractModal(props: any) {
> >
<div className='refunModal-item'> <div className='refunModal-item'>
<div className='refunModal-title'> <div className='refunModal-title'>
<span className='refunModal-red'>*</span> <span className='refunModal-red'>*</span>
</div> </div>
<div className='refunInput'> <div className='refunInput'>
@ -123,11 +123,11 @@ export default function ContractModal(props: any) {
<Form.Item <Form.Item
name="phone" name="phone"
rules={[ rules={[
{required: true, message: '请输入联系电话!'}, {required: true, message: '请输入联系电话!'},
{ // {
pattern: /^1[3456789]\d{9}$/, // pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的手机号码', // message: '请输入正确的手机号码',
}, // },
]} ]}
> >
<Input <Input

View File

@ -3,7 +3,7 @@ export default function ContractText(props: any) {
const height = window.innerHeight - 200; const height = window.innerHeight - 200;
return ( return (
<div className='contract' style={{ height: height, overflow: 'auto', padding: '20px 90px' }}> <div className='contract' style={{ height: height, overflow: 'auto', padding: '20px 90px' }}>
<div className='contractTitle contractTextCenter contractTextBold'>AI秒著引擎平台用户服务协议</div> <div className='contractTitle contractTextCenter contractTextBold'>AI喵著网用户服务协议</div>
<div className='contractNum contractText'></div> <div className='contractNum contractText'></div>
<div className='contractBox'> <div className='contractBox'>
<div><span className='contractLine'>{props.name}</span></div> <div><span className='contractLine'>{props.name}</span></div>
@ -12,18 +12,18 @@ export default function ContractText(props: any) {
</div> </div>
<div className='contractBox'> <div className='contractBox'>
<div><span className='contractLine'>西AI秒著引擎平台</span></div> <div><span className='contractLine'>AI喵著网</span></div>
<div><span className='contractLine'>西西909B6号楼9层0910室</span></div> <div><span className='contractLine'>131</span></div>
<div><span className='contractLine'>400-086-1633</span></div> <div><span className='contractLine'>400-086-1633</span></div>
</div> </div>
<div className='contractBox'> <div className='contractBox'>
<div className='contractText'>AI秒著引擎平台在线服务</div> <div className='contractText'>AI喵著网在线服务</div>
</div> </div>
<div className='contractBox'> <div className='contractBox'>
<div className='contractTitleTwo contractTextBold'></div> <div className='contractTitleTwo contractTextBold'></div>
<div className='contractText'>1.1 AI秒著引擎平台https://www.aimzhu.com/所下单的相关业务甲方在AI秒著引擎平台上注册账户,其注册的下单账号为:***********。</div> <div className='contractText'>1.1 AI喵著网https://www.aimzhu.com/所下单的相关业务甲方在AI喵著网上注册账户,其注册的下单账号为:***********。</div>
<div className='contractText'>1.2 AI秒著引擎平台提供相关服务AI秒著引擎平台具体下单选择的服务类型为准</div> <div className='contractText'>1.2 AI喵著网提供相关服务AI喵著网具体下单选择的服务类型为准</div>
<table border={1} style={{ borderCollapse: 'collapse', width: '100%' ,marginTop:10}}> <table border={1} style={{ borderCollapse: 'collapse', width: '100%' ,marginTop:10}}>
<tbody> <tbody>
@ -97,7 +97,7 @@ export default function ContractText(props: any) {
<div className='contractTitleTwo contractTextBold'></div> <div className='contractTitleTwo contractTextBold'></div>
<div className='contractText'>2.1 线</div> <div className='contractText'>2.1 线</div>
<div className='contractText'>2.2 https://www.aimzhu.com/上付款页面进行。付款后甲方可在线登记发票信息登记后3个工作日内乙方开具数电发票通过平台发送给甲方注册的账号甲方可自行下载。</div> <div className='contractText'>2.2 https://www.aimzhu.com/上付款页面进行。付款后甲方可在线登记发票信息登记后3个工作日内乙方开具数电发票通过平台发送给甲方注册的账号甲方可自行下载。</div>
<div className='contractText'>2.3AI秒著引擎平台下单时显示价格为准</div> <div className='contractText'>2.3AI喵著网下单时显示价格为准</div>
</div> </div>
<div className='contractBox'> <div className='contractBox'>
@ -128,9 +128,9 @@ export default function ContractText(props: any) {
<div className='contractBox'> <div className='contractBox'>
<div className='contractTitleTwo contractTextBold'></div> <div className='contractTitleTwo contractTextBold'></div>
<div className='contractText'>5.1 AI秒著引擎平台上注册账户所提供的相关信息均真实</div> <div className='contractText'>5.1 AI喵著网上注册账户所提供的相关信息均真实</div>
<div className='contractText'>5.2 </div> <div className='contractText'>5.2 </div>
<div className='contractText'>5.3 使AI秒著引擎平台搭建的可运行系统用于合法的目的和用途</div> <div className='contractText'>5.3 使AI喵著网搭建的可运行系统用于合法的目的和用途</div>
</div> </div>
<div className='contractBox'> <div className='contractBox'>
@ -146,7 +146,7 @@ export default function ContractText(props: any) {
<div className='contractText'>7.1 </div> <div className='contractText'>7.1 </div>
<div className='contractText'>7.2 IDC机房等</div> <div className='contractText'>7.2 IDC机房等</div>
<div className='contractText'>7.3 </div> <div className='contractText'>7.3 </div>
<div className='contractText'>7.4 AI秒著引擎平台</div> <div className='contractText'>7.4 AI喵著网</div>
<div className='contractText'>7.5 </div> <div className='contractText'>7.5 </div>
</div> </div>
@ -158,7 +158,7 @@ export default function ContractText(props: any) {
<div className='contractBox'> <div className='contractBox'>
<div className='contractTitleTwo contractTextBold'></div> <div className='contractTitleTwo contractTextBold'></div>
<div className='contractText'>9.1 AI秒著引擎平台https://www.aimzhu.com/UserAgreement.html的约定为准。</div> <div className='contractText'>9.1 AI喵著网https://www.aimzhu.com/UserAgreement.html的约定为准。</div>
<div className='contractText' >9.2 </div> <div className='contractText' >9.2 </div>
<div className='contractText'>9.32.1使</div> <div className='contractText'>9.32.1使</div>
<div className='contractText'>9.4 </div> <div className='contractText'>9.4 </div>
@ -176,7 +176,7 @@ export default function ContractText(props: any) {
<div className='contractText'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div> <div className='contractText'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div>
</div> </div>
<div className='contractBox'> <div className='contractBox'>
<div className='contractText' >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span className='contractLine'>西</span></div> <div className='contractText' >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span className='contractLine'></span></div>
<div className='contractText signBox'> <div className='contractText signBox'>
<div></div> <div></div>
<div className='sign'></div> <div className='sign'></div>

View File

@ -1,4 +1,4 @@
import {Button, Divider, Flex, Form, Input, Modal, Radio, Space} from "antd"; import {Button,Flex, Form, Input, Modal, Radio, Space} from "antd";
import {useEffect, useState} from "react"; import {useEffect, useState} from "react";
import {listDictionary, IDictionary, get, put} from "../../util/AjaxUtils.ts"; import {listDictionary, IDictionary, get, put} from "../../util/AjaxUtils.ts";
import useMessage from "antd/es/message/useMessage"; import useMessage from "antd/es/message/useMessage";
@ -26,6 +26,7 @@ type EditProps = {
invoiceId: string; invoiceId: string;
handleOk: () => void; handleOk: () => void;
handleCancel: () => void; handleCancel: () => void;
// invdataArray: any[];
} }
export default function InvoiceEdit(props: EditProps) { export default function InvoiceEdit(props: EditProps) {
@ -63,6 +64,7 @@ export default function InvoiceEdit(props: EditProps) {
setOrderAmount((data.invoiceAmount / 100).toFixed(2)); setOrderAmount((data.invoiceAmount / 100).toFixed(2));
} }
}) })
}, []); }, []);
return ( return (
@ -76,6 +78,7 @@ export default function InvoiceEdit(props: EditProps) {
onFinish={(values) => { onFinish={(values) => {
modal.confirm({ modal.confirm({
title: '提示', title: '提示',
centered: true,
content: '确定提交吗?', content: '确定提交吗?',
okText: '确定', okText: '确定',
cancelText: '取消', cancelText: '取消',
@ -98,7 +101,7 @@ export default function InvoiceEdit(props: EditProps) {
}); });
}} }}
> >
<Divider orientation="left" plain></Divider> {/* <Divider orientation="left" plain></Divider>
<table className="pay-table"> <table className="pay-table">
<colgroup> <colgroup>
<col width="120"/> <col width="120"/>
@ -288,7 +291,226 @@ export default function InvoiceEdit(props: EditProps) {
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table> */}
<div className="payBox">
<div>
<div className="payTitle"></div>
<div style={{
marginTop: '10px',
}}>
<Button type="link"
onClick={() => {
setIsInvoiceInfoListOpen(true);
}}></Button>
</div>
<div className="payRow">
<div className="payRowL">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="invoiceTitle"
rules={[{ required: true, message: '请输入公司名称' }]}
>
<Input style={{
width: '300px'
}} placeholder="请输入公司名称" />
</Form.Item>
</div>
<div className="payRowR">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="invoiceNo"
rules={[{ required: true, message: '请输入纳税人识别号' }]}
>
<Input
style={{
width: '300px'
}}
placeholder="请输入纳税人识别号" />
</Form.Item>
</div>
</div>
<div className="payRow">
<div className="payRowL">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="invoiceAddress"
rules={[{ required: true, message: '请输入公司地址' }]}
>
<Input
style={{
width: '300px'
}}
placeholder="请输入公司地址" />
</Form.Item>
</div>
<div className="payRowR">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="invoicePhone"
rules={[{ required: true, message: '请输入联系电话' }]}
>
<Input
style={{
width: '300px'
}}
placeholder="请输入联系电话" />
</Form.Item>
</div>
</div>
<div className="payRow">
<div className="payRowL">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="invoiceAccount"
rules={[{ required: true, message: '请输入开户行' }]}
>
<Input
style={{
width: '300px'
}}
placeholder="请输入开户行" />
</Form.Item>
</div>
<div className="payRowR">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="invoiceBank"
rules={[{ required: true, message: '请输入开户行账号' }]}
>
<Input
style={{
width: '300px'
}}
placeholder="请输入开户行账号" />
</Form.Item>
</div>
</div>
<div className="payRow" >
<div className="payRowL">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="content"
rules={[{ required: true, message: '请选择开票内容' }]}
>
<Radio.Group>
<div style={{
width: '300px',
}}>
{contentArray.map(item => <Radio value={item.dataName}
key={item.dataId}>{item.dataName}</Radio>)}
</div>
</Radio.Group>
</Form.Item>
</div>
<div className="payRowR">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="rate"
rules={[{ required: true, message: '请选择开票税率' }]}
>
<Radio.Group>
<div style={{
width: '300px',
}}>
{rateArray.map(item => <Radio value={item.dataName}
key={item.dataId}>{item.dataName}</Radio>)}
</div>
</Radio.Group>
</Form.Item>
</div>
</div>
<div className="payRow" style={{
}}>
<div className="payRowL">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="type"
rules={[{ required: true, message: '请选择发票类型' }]}
>
<Radio.Group>
<div style={{
width: '300px',
}}>
{typeArray.map(item => <Radio value={item.dataName}
key={item.dataId}>{item.dataName}</Radio>)}
</div>
</Radio.Group>
</Form.Item>
</div>
<div className="payRowR">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="isSaveInvoiceInfo"
>
<Radio.Group>
<div style={{
width: '300px',
}}>
<Radio value={0}></Radio>
<Radio value={1}></Radio>
</div>
</Radio.Group>
</Form.Item>
</div>
</div>
</div>
<div>
<div className="payTitle"></div>
<div style={{
marginTop: '10px',
}}>
<div style={{
display: 'flex',
}}>
<div className="payName" style={{
marginTop: '2px',
}}><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="orderIds"
rules={[{ required: true, message: '请选择开票金额' }]}
>
<div>
<span></span>
<span style={{ fontSize: '20px', fontWeight: 'bold' }}>{orderAmount}</span>
<Button type="link" size="small" onClick={() => {
setIsInvoiceOrderListOpen(true);
}}></Button>
</div>
</Form.Item>
</div>
<div style={{
display: 'flex',
}}>
<div className="payName" style={{
marginTop: '2px',
}}></div>
<Form.Item
name="invoiceNote"
>
<Input.TextArea placeholder="请输入开票备注"
style={{ resize: 'none',
width: '820px',
height: '100px',
}}
/>
</Form.Item>
</div>
</div>
</div>
</div>
<Form.Item style={{marginBottom: '0'}}> <Form.Item style={{marginBottom: '0'}}>
<Flex justify="center" style={{marginTop: '15px'}}> <Flex justify="center" style={{marginTop: '15px'}}>
<Space> <Space>
@ -306,6 +528,7 @@ export default function InvoiceEdit(props: EditProps) {
title="开票信息" title="开票信息"
width={1000} width={1000}
footer={false} footer={false}
destroyOnClose
onCancel={() => setIsInvoiceInfoListOpen(false)} onCancel={() => setIsInvoiceInfoListOpen(false)}
> >
<InvoiceInfoList <InvoiceInfoList

View File

@ -1,8 +1,12 @@
import {Button, Dropdown, Flex, MenuProps, Modal, Popconfirm, Space, Table, TableProps, Tag} from "antd"; import { Button, Dropdown, Flex, MenuProps, Modal, Popconfirm, Space, Table, TableProps, Tag } from "antd";
import {PlusOutlined} from "@ant-design/icons"; import { PlusOutlined } from "@ant-design/icons";
import {useEffect, useRef, useState} from "react"; import {
import {get, put} from "../../util/AjaxUtils.ts"; useEffect,
import {IListPage} from "../../interfaces/listpage/IListPage.ts"; // useRef,
useState
} from "react";
import { get, put } from "../../util/AjaxUtils.ts";
import { IListPage } from "../../interfaces/listpage/IListPage.ts";
import useMessage from "antd/es/message/useMessage"; import useMessage from "antd/es/message/useMessage";
import InvoiceSave from "./InvoiceSave.tsx"; import InvoiceSave from "./InvoiceSave.tsx";
import InvoiceEdit from "./InvoiceEdit.tsx"; import InvoiceEdit from "./InvoiceEdit.tsx";
@ -44,8 +48,9 @@ export default function InvoiceList() {
const [isSaveModalOpen, setIsSaveModalOpen] = useState(false); const [isSaveModalOpen, setIsSaveModalOpen] = useState(false);
const [isEditModalOpen, setIsEditModalOpen] = useState(false); const [isEditModalOpen, setIsEditModalOpen] = useState(false);
const [isShowModalOpen, setIsShowModalOpen] = useState(false); const [isShowModalOpen, setIsShowModalOpen] = useState(false);
const invoiceId = useRef(''); // const invoiceId = useRef('');
const [invoiceId, setInvoiceId] = useState('');
// const [invdataArray,setInvDataArray] = useState<any[]>([]);
const columns: TableProps<DataType>['columns'] = [ const columns: TableProps<DataType>['columns'] = [
{ {
title: '名称', title: '名称',
@ -111,16 +116,16 @@ export default function InvoiceList() {
width: 100, width: 100,
fixed: 'right', fixed: 'right',
render: (value) => { render: (value) => {
if(value === InvoiceStatusEnum.PENDING) { if (value === InvoiceStatusEnum.PENDING) {
return <Tag color="magenta"></Tag> return <Tag color="magenta"></Tag>
} }
if(value === InvoiceStatusEnum.COMPLETE) { if (value === InvoiceStatusEnum.COMPLETE) {
return <Tag color="green"></Tag> return <Tag color="green"></Tag>
} }
if(value === InvoiceStatusEnum.FAILED) { if (value === InvoiceStatusEnum.FAILED) {
return <Tag color="red"></Tag> return <Tag color="red"></Tag>
} }
if(value === InvoiceStatusEnum.CANCEL) { if (value === InvoiceStatusEnum.CANCEL) {
return <Tag color="cyan"></Tag> return <Tag color="cyan"></Tag>
} }
} }
@ -132,14 +137,16 @@ export default function InvoiceList() {
width: 120, width: 120,
fixed: 'right', fixed: 'right',
render: (_value, record) => { render: (_value, record) => {
if(record.invoiceStatus === InvoiceStatusEnum.PENDING) { if (record.invoiceStatus === InvoiceStatusEnum.PENDING) {
return <Flex justify="center"> return <Flex justify="center">
<Space> <Space>
<Button type="link" style={{ <Button type="link" style={{
color: 'var(--color-dark)', color: 'var(--color-dark)',
padding: '0' padding: '0'
}} onClick={() => { }} onClick={() => {
invoiceId.current = record.invoiceId; // invoiceId.current = record.invoiceId;
// console.log(record.invoiceId);
setInvoiceId(record.invoiceId);
setIsShowModalOpen(true); setIsShowModalOpen(true);
}}></Button> }}></Button>
<Popconfirm <Popconfirm
@ -172,15 +179,17 @@ export default function InvoiceList() {
</Space> </Space>
</Flex> </Flex>
} }
if(record.invoiceStatus === InvoiceStatusEnum.CANCEL) { if (record.invoiceStatus === InvoiceStatusEnum.CANCEL) {
return <Button type="link" style={{ return <Button type="link" style={{
padding: '0' padding: '0'
}} onClick={() => { }} onClick={() => {
invoiceId.current = record.invoiceId; // invoiceId.current = record.invoiceId;
console.log(record.invoiceId);
setInvoiceId(record.invoiceId);
setIsEditModalOpen(true); setIsEditModalOpen(true);
}}></Button> }}></Button>
} }
if(record.invoiceStatus == InvoiceStatusEnum.COMPLETE) { if (record.invoiceStatus == InvoiceStatusEnum.COMPLETE) {
const items: MenuProps['items'] = []; const items: MenuProps['items'] = [];
record.invoiceFileList.forEach((item, index) => { record.invoiceFileList.forEach((item, index) => {
items.push({ items.push({
@ -210,7 +219,7 @@ export default function InvoiceList() {
rows: 20 rows: 20
} }
}, },
onSuccess({data}) { onSuccess({ data }) {
setPage(data.page); setPage(data.page);
setTotal(data.total); setTotal(data.total);
setDataArray(data.rows); setDataArray(data.rows);
@ -226,26 +235,30 @@ export default function InvoiceList() {
<> <>
<div className="invoice-list-container"> <div className="invoice-list-container">
<div className="mod-list"> <div className="mod-list">
<div className="table-btn-group" style={{marginBottom: '15px'}}> <div className="table-btn-group" style={{ marginBottom: '15px' }}>
<Button value="small" onClick={() => { <Button value="small" onClick={() => {
setIsSaveModalOpen(true); setIsSaveModalOpen(true);
}}><PlusOutlined/> </Button> }}><PlusOutlined /> </Button>
</div> </div>
<Table columns={columns} dataSource={dataArray} pagination={ <Table columns={columns} dataSource={dataArray} pagination={
{ {
pageSize: 20, pageSize: 20,
total: total, total: total,
onChange: (currentPage) => { onChange: (currentPage) => {
setPage(currentPage); setPage(currentPage);
}, },
} }
} scroll={{y: 500}} bordered key="dataTable" rowKey="invoiceId"/> } scroll={{ y: 500 }} bordered key="dataTable" rowKey="invoiceId" />
</div> </div>
</div> </div>
<Modal open={isSaveModalOpen} <Modal open={isSaveModalOpen}
title="申请开票" centered
footer={false} title="申请开票"
onCancel={() => setIsSaveModalOpen(false)} footer={false}
onCancel={() => setIsSaveModalOpen(false)}
width={1000}
destroyOnClose
> >
<InvoiceSave <InvoiceSave
handleOk={() => { handleOk={() => {
@ -258,12 +271,16 @@ export default function InvoiceList() {
/> />
</Modal> </Modal>
<Modal open={isEditModalOpen} <Modal open={isEditModalOpen}
title="修改开票信息" centered
footer={false} width={1000}
onCancel={() => setIsEditModalOpen(false)} title="修改开票信息"
footer={false}
onCancel={() => setIsEditModalOpen(false)}
destroyOnClose
> >
<InvoiceEdit <InvoiceEdit
invoiceId={invoiceId.current} invoiceId={invoiceId}
// invdataArray={invdataArray}
handleOk={() => { handleOk={() => {
getData(); getData();
setIsEditModalOpen(false); setIsEditModalOpen(false);
@ -274,12 +291,15 @@ export default function InvoiceList() {
/> />
</Modal> </Modal>
<Modal open={isShowModalOpen} <Modal open={isShowModalOpen}
title="查看开票信息" destroyOnClose
footer={false} title="查看开票信息"
onCancel={() => setIsShowModalOpen(false)} footer={false}
onCancel={() => setIsShowModalOpen(false)}
centered
> >
{/* {invoiceId.current} */}
<InvoiceShow <InvoiceShow
invoiceId={invoiceId.current} invoiceId={invoiceId}
/> />
</Modal> </Modal>
{messageContext} {messageContext}

View File

@ -0,0 +1,40 @@
.payBox {
border: 1px solid #e4e4e4;
}
.payTitle {
/* width: 100%; */
padding: 5px 10px;
background-color: #e4e4e4;
font-size: 14px;
font-weight: 700;
}
.payRow {
padding: 0px 15px;
margin-top: 10px;
display: flex;
justify-content: space-between;
margin-top: 0;
}
.payRowL {
display: flex;
/* align-items: center; */
/* background-color: skyblue; */
}
.payRowR {
display: flex;
/* align-items: center; */
}
.payName{
/* background-color: skyblue; */
width: 95px;
font-size: 14px;
margin-right: 10px;
height: 30px;
line-height: 30px;
text-align: right;
}

View File

@ -1,11 +1,11 @@
import {Button, Divider, Flex, Form, Input, Modal, Radio, Space} from "antd"; import { Button, Flex, Form, Input, Modal, Radio, Space } from "antd";
import {useEffect, useState} from "react"; import { useEffect, useState } from "react";
import {listDictionary, IDictionary, post} from "../../util/AjaxUtils.ts"; import { listDictionary, IDictionary, post } from "../../util/AjaxUtils.ts";
import useMessage from "antd/es/message/useMessage"; import useMessage from "antd/es/message/useMessage";
import InvoiceInfoList from "./info/InvoiceInfoList.tsx"; import InvoiceInfoList from "./info/InvoiceInfoList.tsx";
import InvoiceOrderList from "./order/InvoiceOrderList.tsx"; import InvoiceOrderList from "./order/InvoiceOrderList.tsx";
import useModal from "antd/es/modal/useModal"; import useModal from "antd/es/modal/useModal";
import './InvoiceSave.css'
type FormFieldType = { type FormFieldType = {
invoiceTitle: string; invoiceTitle: string;
invoiceNo: string; invoiceNo: string;
@ -58,14 +58,16 @@ export default function InvoiceSave(props: SaveProps) {
{modalContext} {modalContext}
<Form <Form
name="basic" name="basic"
initialValues={{isSaveInvoiceInfo: 0}} initialValues={{ isSaveInvoiceInfo: 0 }}
form={form} form={form}
onFinish={(values) => { onFinish={(values) => {
modal.confirm({ modal.confirm({
title: '提示', title: '提示',
content: '确定提交吗?', content: '确定提交吗?',
okText: '确定', okText: '确定',
cancelText: '取消', cancelText: '取消',
centered: true,
okButtonProps: { okButtonProps: {
style: { style: {
backgroundColor: 'val(--color-primary)' backgroundColor: 'val(--color-primary)'
@ -85,199 +87,419 @@ export default function InvoiceSave(props: SaveProps) {
}); });
}} }}
> >
<Divider orientation="left" plain></Divider> {/* <Divider orientation="left" plain></Divider>
<table className="pay-table"> <table className="pay-table">
<colgroup> <colgroup>
<col width="120"/> <col width="120" />
<col/> <col />
</colgroup> </colgroup>
<tbody> <tbody>
<tr> <tr>
<td colSpan={2}> <td colSpan={2}>
<Button type="link" onClick={() => { <Button type="link" onClick={() => {
setIsInvoiceInfoListOpen(true); setIsInvoiceInfoListOpen(true);
}}></Button> }}></Button>
</td> </td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td> <td>
<Form.Item <Form.Item
name="invoiceTitle" name="invoiceTitle"
style={{marginBottom: '0'}} style={{ marginBottom: '0' }}
rules={[{required: true, message: '请输入公司名称'}]} rules={[{ required: true, message: '请输入公司名称' }]}
> >
<Input placeholder="请输入公司名称"/> <Input placeholder="请输入公司名称" />
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td> <td>
<Form.Item <Form.Item
name="invoiceNo" name="invoiceNo"
style={{marginBottom: '0'}} style={{ marginBottom: '0' }}
rules={[{required: true, message: '请输入纳税人识别号'}]} rules={[{ required: true, message: '请输入纳税人识别号' }]}
> >
<Input placeholder="请输入纳税人识别号"/> <Input placeholder="请输入纳税人识别号" />
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td> <td>
<Form.Item <Form.Item
name="invoiceAddress" name="invoiceAddress"
style={{marginBottom: '0'}} style={{ marginBottom: '0' }}
rules={[{required: true, message: '请输入公司地址'}]} rules={[{ required: true, message: '请输入公司地址' }]}
> >
<Input placeholder="请输入公司地址"/> <Input placeholder="请输入公司地址" />
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td> <td>
<Form.Item <Form.Item
name="invoicePhone" name="invoicePhone"
style={{marginBottom: '0'}} style={{ marginBottom: '0' }}
rules={[{required: true, message: '请输入联系电话'}]} rules={[{ required: true, message: '请输入联系电话' }]}
> >
<Input placeholder="请输入联系电话"/> <Input placeholder="请输入联系电话" />
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td> <td>
<Form.Item <Form.Item
name="invoiceAccount" name="invoiceAccount"
style={{marginBottom: '0'}} style={{ marginBottom: '0' }}
rules={[{required: true, message: '请输入开户行'}]} rules={[{ required: true, message: '请输入开户行' }]}
> >
<Input placeholder="请输入开户行"/> <Input placeholder="请输入开户行" />
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td> <td>
<Form.Item <Form.Item
name="invoiceBank" name="invoiceBank"
style={{marginBottom: '0'}} style={{ marginBottom: '0' }}
rules={[{required: true, message: '请输入开户行账号'}]} rules={[{ required: true, message: '请输入开户行账号' }]}
> >
<Input placeholder="请输入开户行账号"/> <Input placeholder="请输入开户行账号" />
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td> <td>
<Form.Item <Form.Item
name="content" name="content"
style={{marginBottom: '0'}} style={{ marginBottom: '0' }}
rules={[{required: true, message: '请选择开票内容'}]} rules={[{ required: true, message: '请选择开票内容' }]}
> >
<Radio.Group> <Radio.Group>
<Space direction="vertical"> <Space direction="vertical">
{contentArray.map(item => <Radio value={item.dataName} {contentArray.map(item => <Radio value={item.dataName}
key={item.dataId}>{item.dataName}</Radio>)} key={item.dataId}>{item.dataName}</Radio>)}
</Space> </Space>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td> <td>
<Form.Item <Form.Item
name="rate" name="rate"
style={{marginBottom: '0'}} style={{ marginBottom: '0' }}
rules={[{required: true, message: '请选择开票税率'}]} rules={[{ required: true, message: '请选择开票税率' }]}
> >
<Radio.Group> <Radio.Group>
{rateArray.map(item => <Radio value={item.dataName} {rateArray.map(item => <Radio value={item.dataName}
key={item.dataId}>{item.dataName}</Radio>)} key={item.dataId}>{item.dataName}</Radio>)}
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td> <td>
<Form.Item <Form.Item
name="type" name="type"
style={{marginBottom: '0'}} style={{ marginBottom: '0' }}
rules={[{required: true, message: '请选择发票类型'}]} rules={[{ required: true, message: '请选择发票类型' }]}
> >
<Radio.Group> <Radio.Group>
<Space direction="vertical"> <Space direction="vertical">
{typeArray.map(item => <Radio value={item.dataName} {typeArray.map(item => <Radio value={item.dataName}
key={item.dataId}>{item.dataName}</Radio>)} key={item.dataId}>{item.dataName}</Radio>)}
</Space> </Space>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td> <td>
<Form.Item <Form.Item
name="isSaveInvoiceInfo" name="isSaveInvoiceInfo"
style={{marginBottom: '0'}} style={{ marginBottom: '0' }}
> >
<Radio.Group> <Radio.Group>
<Radio value={0}></Radio> <Radio value={0}></Radio>
<Radio value={1}></Radio> <Radio value={1}></Radio>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<Divider orientation="left" plain></Divider> <Divider orientation="left" plain></Divider>
<table className="pay-table"> <table className="pay-table">
<colgroup> <colgroup>
<col width="120"/> <col width="120" />
<col/> <col />
</colgroup> </colgroup>
<tbody> <tbody>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td> <td>
<Form.Item <Form.Item
name="orderIds" name="orderIds"
style={{marginBottom: '0'}} style={{ marginBottom: '0' }}
rules={[{required: true, message: '请选择开票金额'}]} rules={[{ required: true, message: '请选择开票金额' }]}
> >
<div> <div>
<span></span> <span></span>
<span style={{fontSize: '20px', fontWeight: 'bold'}}>{orderAmount}</span> <span style={{ fontSize: '20px', fontWeight: 'bold' }}>{orderAmount}</span>
<Button type="link" size="small" onClick={() => { <Button type="link" size="small" onClick={() => {
setIsInvoiceOrderListOpen(true); setIsInvoiceOrderListOpen(true);
}}></Button> }}></Button>
</div> </div>
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td className="table-label"></td> <td className="table-label"></td>
<td> <td>
<Form.Item <Form.Item
name="invoiceNote" name="invoiceNote"
style={{marginBottom: '0'}} style={{ marginBottom: '0' }}
> >
<Input.TextArea placeholder="请输入开票备注" rows={4}/> <Input.TextArea placeholder="请输入开票备注" rows={4} />
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table> */}
<Form.Item style={{marginBottom: '0'}}> <div className="payBox">
<Flex justify="center" style={{marginTop: '15px'}}> <div>
<div className="payTitle"></div>
<div style={{
marginTop: '10px',
}}>
<Button type="link"
onClick={() => {
setIsInvoiceInfoListOpen(true);
}}></Button>
</div>
<div className="payRow">
<div className="payRowL">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="invoiceTitle"
rules={[{ required: true, message: '请输入公司名称' }]}
>
<Input style={{
width: '300px'
}} placeholder="请输入公司名称" />
</Form.Item>
</div>
<div className="payRowR">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="invoiceNo"
rules={[{ required: true, message: '请输入纳税人识别号' }]}
>
<Input
style={{
width: '300px'
}}
placeholder="请输入纳税人识别号" />
</Form.Item>
</div>
</div>
<div className="payRow">
<div className="payRowL">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="invoiceAddress"
rules={[{ required: true, message: '请输入公司地址' }]}
>
<Input
style={{
width: '300px'
}}
placeholder="请输入公司地址" />
</Form.Item>
</div>
<div className="payRowR">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="invoicePhone"
rules={[{ required: true, message: '请输入联系电话' }]}
>
<Input
style={{
width: '300px'
}}
placeholder="请输入联系电话" />
</Form.Item>
</div>
</div>
<div className="payRow">
<div className="payRowL">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="invoiceAccount"
rules={[{ required: true, message: '请输入开户行' }]}
>
<Input
style={{
width: '300px'
}}
placeholder="请输入开户行" />
</Form.Item>
</div>
<div className="payRowR">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="invoiceBank"
rules={[{ required: true, message: '请输入开户行账号' }]}
>
<Input
style={{
width: '300px'
}}
placeholder="请输入开户行账号" />
</Form.Item>
</div>
</div>
<div className="payRow" >
<div className="payRowL">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="content"
rules={[{ required: true, message: '请选择开票内容' }]}
>
<Radio.Group>
<div style={{
width: '300px',
}}>
{contentArray.map(item => <Radio value={item.dataName}
key={item.dataId}>{item.dataName}</Radio>)}
</div>
</Radio.Group>
</Form.Item>
</div>
<div className="payRowR">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="rate"
rules={[{ required: true, message: '请选择开票税率' }]}
>
<Radio.Group>
<div style={{
width: '300px',
}}>
{rateArray.map(item => <Radio value={item.dataName}
key={item.dataId}>{item.dataName}</Radio>)}
</div>
</Radio.Group>
</Form.Item>
</div>
</div>
<div className="payRow" style={{
}}>
<div className="payRowL">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="type"
rules={[{ required: true, message: '请选择发票类型' }]}
>
<Radio.Group>
<div style={{
width: '300px',
}}>
{typeArray.map(item => <Radio value={item.dataName}
key={item.dataId}>{item.dataName}</Radio>)}
</div>
</Radio.Group>
</Form.Item>
</div>
<div className="payRowR">
<div className="payName"><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="isSaveInvoiceInfo"
>
<Radio.Group>
<div style={{
width: '300px',
}}>
<Radio value={0}></Radio>
<Radio value={1}></Radio>
</div>
</Radio.Group>
</Form.Item>
</div>
</div>
</div>
<div>
<div className="payTitle"></div>
<div style={{
marginTop: '10px',
}}>
<div style={{
display: 'flex',
}}>
<div className="payName" style={{
marginTop: '2px',
}}><span style={{ color: 'red' }}>*</span></div>
<Form.Item
name="orderIds"
rules={[{ required: true, message: '请选择开票金额' }]}
>
<div>
<span></span>
<span style={{ fontSize: '20px', fontWeight: 'bold' }}>{orderAmount}</span>
<Button type="link" size="small" onClick={() => {
setIsInvoiceOrderListOpen(true);
}}></Button>
</div>
</Form.Item>
</div>
<div style={{
display: 'flex',
}}>
<div className="payName" style={{
marginTop: '2px',
}}></div>
<Form.Item
name="invoiceNote"
>
<Input.TextArea placeholder="请输入开票备注"
style={{
resize: 'none',
width: '820px',
height: '100px',
}}
/>
</Form.Item>
</div>
</div>
</div>
</div>
<Form.Item style={{ marginBottom: '0' }}>
<Flex justify="center" style={{ marginTop: '15px' }}>
<Space> <Space>
<Button type="primary" htmlType="submit" style={{ <Button type="primary" htmlType="submit" style={{
backgroundColor: 'var(--color-primary)' backgroundColor: 'var(--color-primary)'
@ -290,12 +512,14 @@ export default function InvoiceSave(props: SaveProps) {
</Form.Item> </Form.Item>
</Form> </Form>
<Modal open={isInvoiceInfoListOpen} <Modal open={isInvoiceInfoListOpen}
title="开票信息" destroyOnClose
width={1000} centered
footer={false} title="开票信息"
onCancel={() => { width={1000}
setIsInvoiceInfoListOpen(false); footer={false}
}} onCancel={() => {
setIsInvoiceInfoListOpen(false);
}}
> >
<InvoiceInfoList <InvoiceInfoList
handleOk={(selectedInvoice) => { handleOk={(selectedInvoice) => {
@ -315,10 +539,10 @@ export default function InvoiceSave(props: SaveProps) {
/> />
</Modal> </Modal>
<Modal open={isInvoiceOrderListOpen} <Modal open={isInvoiceOrderListOpen}
title="开票订单" title="开票订单"
width={1000} width={1000}
footer={false} footer={false}
onCancel={() => setIsInvoiceOrderListOpen(false)} onCancel={() => setIsInvoiceOrderListOpen(false)}
> >
<InvoiceOrderList <InvoiceOrderList
handleOk={(selectedOrders) => { handleOk={(selectedOrders) => {

View File

@ -1,6 +1,6 @@
import {Button, Divider, Modal} from "antd"; import { Button, Divider, Modal } from "antd";
import {useEffect, useState} from "react"; import { useEffect, useState } from "react";
import {get} from "../../util/AjaxUtils.ts"; import { get } from "../../util/AjaxUtils.ts";
import useMessage from "antd/es/message/useMessage"; import useMessage from "antd/es/message/useMessage";
import InvoiceInfoSelectedList from "./order/InvoiceOrderSelectedList.tsx" import InvoiceInfoSelectedList from "./order/InvoiceOrderSelectedList.tsx"
@ -31,19 +31,22 @@ export default function InvoiceShow(props: ShowProps) {
const [orderAmount, setOrderAmount] = useState('0'); const [orderAmount, setOrderAmount] = useState('0');
useEffect(() => { useEffect(() => {
if (!props.invoiceId) { if (!props.invoiceId) {
return; return;
} }
get<DataType>({ get<DataType>({
messageApi, messageApi,
url: `/api/invoice/get/${props.invoiceId}`, url: `/api/invoice/get/${props.invoiceId}`,
onSuccess({data}) { onSuccess({ data }) {
setInvoiceData({ setInvoiceData({
...data ...data
}); });
setOrderAmount((data.invoiceAmount / 100).toFixed(2)); setOrderAmount((data.invoiceAmount / 100).toFixed(2));
} }
}) })
}, []); }, []);
return ( return (
@ -52,80 +55,81 @@ export default function InvoiceShow(props: ShowProps) {
<Divider orientation="left" plain></Divider> <Divider orientation="left" plain></Divider>
<table className="pay-table"> <table className="pay-table">
<colgroup> <colgroup>
<col width="120"/> <col width="120" />
<col/> <col />
</colgroup> </colgroup>
<tbody> <tbody>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td>{invoiceData?.invoiceTitle}</td> <td>{invoiceData?.invoiceTitle}</td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td>{invoiceData?.invoiceNo}</td> <td>{invoiceData?.invoiceNo}</td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td>{invoiceData?.invoiceAddress}</td> <td>{invoiceData?.invoiceAddress}</td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td>{invoiceData?.invoicePhone}</td> <td>{invoiceData?.invoicePhone}</td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td>{invoiceData?.invoiceAccount}</td> <td>{invoiceData?.invoiceAccount}</td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td>{invoiceData?.invoiceBank}</td> <td>{invoiceData?.invoiceBank}</td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td>{invoiceData?.content}</td> <td>{invoiceData?.content}</td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td>{invoiceData?.rate}</td> <td>{invoiceData?.rate}</td>
</tr> </tr>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td>{invoiceData?.type}</td> <td>{invoiceData?.type}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<Divider orientation="left" plain></Divider> <Divider orientation="left" plain></Divider>
<table className="pay-table"> <table className="pay-table">
<colgroup> <colgroup>
<col width="120"/> <col width="120" />
<col/> <col />
</colgroup> </colgroup>
<tbody> <tbody>
<tr> <tr>
<td className="table-label"> *</td> <td className="table-label"> *</td>
<td> <td>
<div> <div>
<span></span> <span></span>
<span style={{fontSize: '20px', fontWeight: 'bold'}}>{orderAmount}</span> <span style={{ fontSize: '20px', fontWeight: 'bold' }}>{orderAmount}</span>
<Button type="link" size="small" onClick={() => { <Button type="link" size="small" onClick={() => {
setIsInvoiceOrderListOpen(true); setIsInvoiceOrderListOpen(true);
}}></Button> }}></Button>
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td className="table-label"></td> <td className="table-label"></td>
<td>{invoiceData?.invoiceNote}</td> <td>{invoiceData?.invoiceNote}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<Modal open={isInvoiceOrderListOpen} <Modal open={isInvoiceOrderListOpen}
title="开票订单" centered
width={1000} title="开票订单"
footer={false} width={1000}
onCancel={() => setIsInvoiceOrderListOpen(false)} footer={false}
onCancel={() => setIsInvoiceOrderListOpen(false)}
> >
<InvoiceInfoSelectedList invoiceId={props.invoiceId}/> <InvoiceInfoSelectedList invoiceId={props.invoiceId} />
</Modal> </Modal>
</> </>
); );

View File

@ -1,22 +1,23 @@
import {Table, TableProps, Tooltip} from "antd"; import {Table, TableProps,
Tooltip} from "antd";
import useMessage from "antd/es/message/useMessage"; import useMessage from "antd/es/message/useMessage";
import {useEffect, useState} from "react"; import {useEffect, useState} from "react";
import {get} from "../../../util/AjaxUtils.ts"; import {get} from "../../../util/AjaxUtils.ts";
import {IListPage} from "../../../interfaces/listpage/IListPage.ts"; import {IListPage} from "../../../interfaces/listpage/IListPage.ts";
type DetailDataType = { // type DetailDataType = {
productType: string; // productType: string;
quantity: number; // quantity: number;
unitPrice: number; // unitPrice: number;
notes: string; // notes: string;
productDescription: string; // productDescription: string;
} // }
type DataType = { type DataType = {
orderId: string; orderId: string;
orderNo: string; orderNo: string;
totalAmount: number; totalAmount: number;
detail: DetailDataType; orderDetails: any;
orderStatus: string; orderStatus: string;
gmtCreate: string; gmtCreate: string;
} }
@ -71,60 +72,60 @@ export default function InvoiceInfoSelectedList(props: ListProps) {
}, },
{ {
title: '产品类型', title: '产品类型',
dataIndex: 'detail.productType', dataIndex: 'orderDetails.0.productType',
align: 'center', align: 'center',
width: 100, width: 100,
render: (_value, record) => { render: (_value, record) => {
if(record.detail.productType === 'PROJ') { if(record.orderDetails[0].productType === 'PROJ') {
return '项目创建' return '项目创建'
} }
if(record.detail.productType === 'AGENT') { if(record.orderDetails[0].productType === 'AGENT') {
return '项目代理' return '项目代理'
} }
return record.detail.productType return record.orderDetails[0].productType
} }
}, },
{ {
title: '数量', title: '数量',
dataIndex: 'detail.quantity', dataIndex: 'orderDetails.0.quantity',
align: 'center', align: 'center',
width: 100, width: 100,
render: (_value, record) => { render: (_value, record) => {
return record.detail.quantity return record.orderDetails[0].quantity
} }
}, },
{ {
title: '单价', title: '单价',
dataIndex: 'detail.unitPrice', dataIndex: 'orderDetails.0.unitPrice',
align: 'center', align: 'center',
width: 100, width: 100,
render: (_value, record) => { render: (_value, record) => {
return (record.detail.unitPrice / 100).toFixed(2) return (record.orderDetails[0].unitPrice / 100).toFixed(2)
} }
}, },
{ {
title: '订单备注', title: '订单备注',
dataIndex: 'detail.notes', dataIndex: 'orderDetails.0.notes',
align: 'center', align: 'center',
width: 120, width: 120,
render: (_value, record) => { render: (_value, record) => {
return record.detail.notes return record.orderDetails[0].notes
} }
}, },
{ {
title: '描述', title: '描述',
dataIndex: 'detail.productDescription', dataIndex: 'orderDetails.0.productDescription',
align: 'center', align: 'center',
width: 200, width: 200,
ellipsis: { ellipsis: {
showTitle: false, showTitle: false,
}, },
render: (_value, record) => { render: (_value, record) => {
return <Tooltip placement="top" title={record.detail.productDescription}>{record.detail.productDescription}</Tooltip> return <Tooltip placement="top" title={record.orderDetails[0].productDescription}>{record.orderDetails[0].productDescription}</Tooltip>
} }
}, },
] ]
// const columns = []
useEffect(() => { useEffect(() => {
get<IListPage<DataType>>({ get<IListPage<DataType>>({
messageApi, messageApi,

View File

@ -254,7 +254,7 @@ export default function UserEdit(props: IUserEditProps) {
<Input placeholder="请输入名称" /> <Input placeholder="请输入名称" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> {/* <Col span={12}>
<Form.Item label="公司英文名" <Form.Item label="公司英文名"
name="userInfoNameEn" name="userInfoNameEn"
rules={[ rules={[
@ -267,7 +267,7 @@ export default function UserEdit(props: IUserEditProps) {
> >
<Input placeholder="请输入公司英文名" /> <Input placeholder="请输入公司英文名" />
</Form.Item> </Form.Item>
</Col> </Col> */}
</Row> </Row>
<Row gutter={15}> <Row gutter={15}>
<Col span={12}> <Col span={12}>

View File

@ -20,6 +20,7 @@ export function reloadUser(messageApi: MessageInstance, globalDispatchContext: D
messageApi, messageApi,
url: '/api/user-info/get-user-self', url: '/api/user-info/get-user-self',
onSuccess({data}) { onSuccess({data}) {
globalDispatchContext({ globalDispatchContext({
type: GlobalDataActionType.REFRESH_SELF, type: GlobalDataActionType.REFRESH_SELF,
user: { user: {
@ -30,6 +31,15 @@ export function reloadUser(messageApi: MessageInstance, globalDispatchContext: D
hasUserInfo: data.hasUserInfo, hasUserInfo: data.hasUserInfo,
} }
}) })
// localStorage.setItem('token', data.accessToken);
// 获取内存中的token
// const currentToken = sessionStorage.getItem('token');
// // 检查内存中的token与获取的token是否一致
// if (currentToken!== data.accessToken) {
// sessionStorage.setItem('token', data.accessToken);
// }
// console.log('用户信息',data);
resolve(data); resolve(data);
} }
}) })

View File

@ -108,6 +108,7 @@ import {
// post, // post,
getUseUrl getUseUrl
} from "../../util/AjaxUtils.ts"; } from "../../util/AjaxUtils.ts";
import { getLoginflag } from '../../request/api'
import { GlobalContext, GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts"; import { GlobalContext, GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
import UserEdit from "../../components/user/UserEdit.tsx"; import UserEdit from "../../components/user/UserEdit.tsx";
import PasswordChange from "../../components/password/PasswordChange.tsx"; import PasswordChange from "../../components/password/PasswordChange.tsx";
@ -844,12 +845,33 @@ export default function Head() {
} }
}) })
} }
useEffect(() => { useEffect(() => {
getUnRead() getUnRead()
// 五分钟刷新一次用户信息
setInterval(reloadUserInterval, 5 * 60 * 1000); setInterval(reloadUserInterval, 5 * 60 * 1000);
getMyPackNum() getMyPackNum()
}, [])
}, [])
const loginFlag = async() => {
// await getLoginflag(globalContext.user.userId)
await getLoginflag(globalContext.user.userId);
sessionStorage.setItem('isLoggedIn', 'true');
}
useEffect(() => {
if (globalContext.user.userId) {
const islogin = sessionStorage.getItem('isLoggedIn');
if (!islogin ) {
loginFlag()
}
// loginFlag()
}
// loginFlag()
}, [globalContext.user.userId])
const items: MenuProps['items'] = [ const items: MenuProps['items'] = [
{ {
@ -968,7 +990,8 @@ export default function Head() {
), ),
onClick: () => { onClick: () => {
reMenuActive() reMenuActive()
// 清除缓存
sessionStorage.clear()
window.location.href = '/copyright/logout' window.location.href = '/copyright/logout'
} }
}, },
@ -1066,31 +1089,31 @@ export default function Head() {
<div style={{ <div style={{
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent:'center', justifyContent: 'center',
cursor: 'pointer', cursor: 'pointer',
}} }}
onClick={() => { onClick={() => {
setPackageModal(true) setPackageModal(true)
setPackPage(1); setPackPage(1);
getPickList(1, '') getPickList(1, '')
}} }}
> >
<img src={pack} width={19} height={19} alt="" /> <img src={pack} width={19} height={19} alt="" />
<div style={{ <div style={{
fontSize:14, fontSize: 14,
marginLeft:5 marginLeft: 5
}}></div> }}></div>
</div> </div>
<div style={{ <div style={{
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
marginTop:5 marginTop: 5
}}> }}>
<div> <div>
<span style={{ <span style={{
fontSize: 12, fontSize: 12,
color: '#FF9F08', color: '#FF9F08',
}}> </span> }}> </span>
<span <span
style={{ style={{
@ -1099,31 +1122,31 @@ export default function Head() {
fontWeight: 700, fontWeight: 700,
}} }}
>{packNum.ALL}</span> >{packNum.ALL}</span>
<span style={{ <span style={{
fontSize: 12, fontSize: 12,
color: '#FF9F08', color: '#FF9F08',
}}> </span> }}> </span>
</div> </div>
<div style={{ <div style={{
marginLeft:15 marginLeft: 15
}}> }}>
<span style={{ <span style={{
fontSize: 12, fontSize: 12,
color: '#FF9F08', color: '#FF9F08',
}}> </span> }}> </span>
<span <span
style={{ style={{
fontSize: 16, fontSize: 16,
color: '#FF9F08', color: '#FF9F08',
fontWeight: 700, fontWeight: 700,
}} }}
>{packNum.MATERIAL}</span> >{packNum.MATERIAL}</span>
<span style={{ <span style={{
fontSize: 12, fontSize: 12,
color: '#FF9F08', color: '#FF9F08',
}}> </span> }}> </span>
</div> </div>
</div> </div>

4
src/request/api.ts Normal file
View File

@ -0,0 +1,4 @@
import request from './request'
// 获取登录标志
export const getLoginflag = (userId:string) => request.get(`/operator-plugin/app/contentcensusrelease/log?requestUrl=网页USER${userId}`)

27
src/request/request.ts Normal file
View File

@ -0,0 +1,27 @@
import axios from "axios";
const baseURL = 'https://www.aimzhu.com';
const request = axios.create({
baseURL: baseURL,
timeout: 5000,
});
request.interceptors.request.use(
(config) => {
// 有token带token
const token = sessionStorage.getItem('token')
config.headers = config.headers || {}
config.headers['Auth'] = token ? `Bearer ${token}` : '';
return config;
},
(err) => Promise.reject(err)
);
request.interceptors.response.use(
(res) => {
return res.data;
},
(err) => Promise.reject(err)
);
export default request

View File

@ -311,6 +311,10 @@ export default function ProjCreate() {
id: ProjChargeType.FREE, id: ProjChargeType.FREE,
price: freeInfo.price, price: freeInfo.price,
handleClick: (_title, additional) => { handleClick: (_title, additional) => {
if(freeCount <= 0){
messageApi.warning('免费试用次数已用完')
return
}
nav(`/proj-new/${ProjChargeType.FREE}?${additional.pkg ? 'pkg=true' : 'pkg='}&${additional.videoDemo ? 'videoDemo=true' : 'videoDemo='}`) nav(`/proj-new/${ProjChargeType.FREE}?${additional.pkg ? 'pkg=true' : 'pkg='}&${additional.videoDemo ? 'videoDemo=true' : 'videoDemo='}`)
} }
} }

View File

@ -44,7 +44,7 @@ interface DataType {
packageOrderId: string; packageOrderId: string;
} }
import { useDispatch } from 'react-redux' import { useDispatch,useSelector } from 'react-redux'
export default function ProjNew() { export default function ProjNew() {
const dispath = useDispatch() const dispath = useDispatch()
// 更新redux的套餐包信息 // 更新redux的套餐包信息
@ -69,6 +69,10 @@ export default function ProjNew() {
} }
}) })
} }
const redxuState: any = useSelector(state => state)
// const [packageType, setPackageType] = useState('')
const packNum = redxuState.packNum
const [packselectShow, setPackselectShow] = useState(false)
const [debounceTimer, setDebounceTimer] = useState<any>(null); const [debounceTimer, setDebounceTimer] = useState<any>(null);
// 创建一个 ref 来引用推荐列表容器 // 创建一个 ref 来引用推荐列表容器
const recommendListRef = useRef<HTMLDivElement>(null); const recommendListRef = useRef<HTMLDivElement>(null);
@ -196,9 +200,11 @@ export default function ProjNew() {
authorType: '', authorType: '',
authorIdCardType: '', authorIdCardType: '',
authorIdCard: '', authorIdCard: '',
authorCrcAccount: '', authorCrcAccount: 0,
authorId: '', authorId: '',
authorProvinceCity: '' authorProvinceCity: '',
authorCrcAccountPassword: '',
authorCrcAccountUsername: ''
}) })
const [concatPeopleInfo, setConcatPeopleInfo] = useState({ const [concatPeopleInfo, setConcatPeopleInfo] = useState({
applyConcatId: '', applyConcatId: '',
@ -380,6 +386,15 @@ export default function ProjNew() {
// setPage(1) // setPage(1)
// } // }
// },[projInfo.packageInfoId]) // },[projInfo.packageInfoId])
useEffect(() => {
if(packNum.ALL > 0 && pathParams.projChargeType == 'ALL'){
setPackselectShow(true)
}
if(packNum.MATERIAL > 0 && pathParams.projChargeType == 'MATERIAL'){
setPackselectShow(true)
}
}, [packNum]);
useEffect(() => { useEffect(() => {
get({ get({
messageApi: messageApi, messageApi: messageApi,
@ -638,7 +653,7 @@ export default function ProjNew() {
</Form.Item> </Form.Item>
<div style={{ <div style={{
display:belongPeopleInfo.authorId? 'none' : 'unset', display: belongPeopleInfo.authorId ? 'none' : 'unset',
position: 'absolute', right: 20, position: 'absolute', right: 20,
// fontSize: 16, // fontSize: 16,
color: " #1F79FF", cursor: 'pointer', color: " #1F79FF", cursor: 'pointer',
@ -649,7 +664,7 @@ export default function ProjNew() {
setBelongModal(true) setBelongModal(true)
}}></div> }}></div>
<div style={{ <div style={{
display:belongPeopleInfo.authorId? 'unset' : 'none', display: belongPeopleInfo.authorId ? 'unset' : 'none',
position: 'absolute', right: 0, position: 'absolute', right: 0,
// fontSize: 16, // fontSize: 16,
@ -665,9 +680,11 @@ export default function ProjNew() {
authorType: '', authorType: '',
authorIdCardType: '', authorIdCardType: '',
authorIdCard: '', authorIdCard: '',
authorCrcAccount: '', authorCrcAccount: 0,
authorId: '', authorId: '',
authorProvinceCity: '' authorProvinceCity: '',
authorCrcAccountUsername: '',
authorCrcAccountPassword: '',
}) })
}}></div> }}></div>
</div> </div>
@ -835,16 +852,30 @@ export default function ProjNew() {
// background: '#eeeeee', // background: '#eeeeee',
// fontSize: 16, // fontSize: 16,
width: '310px', height: '42px', color: '#3B3B3B' width: '310px', height: '42px', color: '#3B3B3B'
}} placeholder={packList.length > 0 ? '请选择套餐包' : '暂无套餐包'} }}
// placeholder={packList.length > 0 ? '请选择套餐包' : '暂无套餐包'}
placeholder={packselectShow ? '请选择套餐包' : '暂无套餐包'}
disabled disabled
/> />
</Form.Item> </Form.Item>
<div style={{
position: 'absolute',
// left: 165,
left: 158,
top: 40,
// display: showTip ? 'unset' : 'none',
color: 'red',
fontSize: 18,
fontWeight: 'bold',
}}></div>
<div <div
style={{ style={{
display: selectPack ? 'none' : 'unset', position: 'absolute', right: 23, display: selectPack ? 'none' : 'unset', position: 'absolute', right: 23,
// fontSize: 16, // fontSize: 16,
color: packList.length ? '#1F79FF' : '#676767', cursor: 'pointer', // color: packList.length ? '#1F79FF' : '#676767', cursor: 'pointer',
color: packselectShow ? '#1F79FF' : '#676767', cursor: 'pointer',
// background:'pink', // background:'pink',
width: 290, width: 290,
textAlign: 'right', textAlign: 'right',
@ -852,7 +883,7 @@ export default function ProjNew() {
onClick={() => { onClick={() => {
if (packList.length > 0) { if (packList.length > 0) {
setPackModal(true) setPackModal(true)
// setPage(1) setPage(1)
setSelectedRowKeys([]) setSelectedRowKeys([])
getPickList(1) getPickList(1)
// #1F79FF // #1F79FF
@ -861,9 +892,13 @@ export default function ProjNew() {
} }
}}></div> }}></div>
<div style={{ display: selectPack ? 'unset' : 'none', position: 'absolute', right: 23, fontSize: 16, color: '#1F79FF', cursor: 'pointer' }} onClick={() => { <div style={{ display: selectPack ? 'unset' : 'none', position: 'absolute', right: 23, color: '#1F79FF', cursor: 'pointer' }} onClick={() => {
// setPackageInfoId('') // setPackageInfoId('')
setPackageOrderId('') setPackageOrderId('')
setNowpackageOrderId('')
setNowPackageName ('')
form.setFieldsValue({ form.setFieldsValue({
packageName: '' packageName: ''
}) })
@ -1013,7 +1048,7 @@ export default function ProjNew() {
// background:'pink', // background:'pink',
lineHeight: '40px' lineHeight: '40px'
}}> : }}>
<span <span
style={{ style={{
color: 'red', color: 'red',
@ -1091,6 +1126,8 @@ export default function ProjNew() {
// dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat), // dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat),
projDevCompleteDate: projInfo.projDevCompleteDate ? dayjs(projInfo.projDevCompleteDate).format(dateFormat) : '', projDevCompleteDate: projInfo.projDevCompleteDate ? dayjs(projInfo.projDevCompleteDate).format(dateFormat) : '',
authorCrcAccount: belongPeopleInfo.authorCrcAccount, authorCrcAccount: belongPeopleInfo.authorCrcAccount,
authorCrcAccountPassword: belongPeopleInfo.authorCrcAccountPassword,
authorCrcAccountUsername: belongPeopleInfo.authorCrcAccountUsername,
authorId: belongPeopleInfo.authorId, authorId: belongPeopleInfo.authorId,
authorIdCard: belongPeopleInfo.authorIdCard, authorIdCard: belongPeopleInfo.authorIdCard,
authorIdCardType: belongPeopleInfo.authorIdCardType, authorIdCardType: belongPeopleInfo.authorIdCardType,
@ -1104,7 +1141,6 @@ export default function ProjNew() {
applyContactId: concatPeopleInfo.applyConcatId, applyContactId: concatPeopleInfo.applyConcatId,
applyContactName: concatPeopleInfo.applyContactName, applyContactName: concatPeopleInfo.applyContactName,
applyContactPhone: concatPeopleInfo.applyContactPhone, applyContactPhone: concatPeopleInfo.applyContactPhone,
couponId: couponId ? couponId : '', couponId: couponId ? couponId : '',
// packageInfoId: packageInfoId ? packageInfoId : '' // packageInfoId: packageInfoId ? packageInfoId : ''
packageOrderId: packageOrderId ? packageOrderId : '', packageOrderId: packageOrderId ? packageOrderId : '',
@ -1309,6 +1345,10 @@ export default function ProjNew() {
}} }}
type="primary" type="primary"
onClick={() => { onClick={() => {
if (!nowPackageName) {
messageApi.error('请选择套餐包')
return
}
// setPickSelectNo(nowPickSelectNo) // setPickSelectNo(nowPickSelectNo)
// setShowPrice(0) // setShowPrice(0)
setSelectPack(true) setSelectPack(true)
@ -1427,9 +1467,25 @@ export default function ProjNew() {
</div> </div>
</div> </div>
<div style={{ <div style={{
textAlign: 'right', // textAlign: 'right',
marginTop: 10, marginTop: 10,
// background: '#F3F3F3',
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
}}> }}>
<div style={{
fontSize: 16,
fontWeight: 'bold',
}}>
<div><span style={{
color: 'red',
}}> </span> </div>
<div style={{
color:'#1677ff',
}}></div>
</div>
<Button type="primary" <Button type="primary"
style={{ style={{
width: 100, width: 100,

View File

@ -142,34 +142,34 @@ export default function ProjEditStep2(props: any) {
// setauthorCrcAccountUsername(selectedRows[0].crcAccountUsername) // setauthorCrcAccountUsername(selectedRows[0].crcAccountUsername)
// setAuthorId(selectedRows[0].projOwnerId) // setAuthorId(selectedRows[0].projOwnerId)
// } // }
// 判断是否是清空选中状态 // 判断是否是清空选中状态
const isClearingSelection = selectedRowKeys.length === 0; const isClearingSelection = selectedRowKeys.length === 0;
if (isClearingSelection) { if (isClearingSelection) {
setauthorName(''); setauthorName('');
setauthorIdCardType(''); setauthorIdCardType('');
setauthorIdCard(''); setauthorIdCard('');
setauthorType(''); setauthorType('');
setauthorNameEn(''); setauthorNameEn('');
setauthorProvinceCity(''); setauthorProvinceCity('');
setauthorCrcAccount(0); setauthorCrcAccount(0);
setauthorCrcAccountPassword(''); setauthorCrcAccountPassword('');
setauthorCrcAccountUsername(''); setauthorCrcAccountUsername('');
setAuthorId(''); setAuthorId('');
} else { } else {
// 正常选中时,更新相关状态 // 正常选中时,更新相关状态
setSelectedRowKeys(selectedRowKeys); setSelectedRowKeys(selectedRowKeys);
const firstSelectedRow = selectedRows[0]; const firstSelectedRow = selectedRows[0];
setauthorName(firstSelectedRow.name); setauthorName(firstSelectedRow.name);
setauthorIdCardType(firstSelectedRow.idCardType); setauthorIdCardType(firstSelectedRow.idCardType);
setauthorIdCard(firstSelectedRow.idCardNo); setauthorIdCard(firstSelectedRow.idCardNo);
setauthorType(firstSelectedRow.type); setauthorType(firstSelectedRow.type);
setauthorNameEn(firstSelectedRow.nameEn); setauthorNameEn(firstSelectedRow.nameEn);
setauthorProvinceCity(firstSelectedRow.provinceCity); setauthorProvinceCity(firstSelectedRow.provinceCity);
setauthorCrcAccount(firstSelectedRow.isCrcAccount); setauthorCrcAccount(firstSelectedRow.isCrcAccount);
setauthorCrcAccountPassword(firstSelectedRow.crcAccountPassword); setauthorCrcAccountPassword(firstSelectedRow.crcAccountPassword);
setauthorCrcAccountUsername(firstSelectedRow.crcAccountUsername); setauthorCrcAccountUsername(firstSelectedRow.crcAccountUsername);
setAuthorId(firstSelectedRow.projOwnerId); setAuthorId(firstSelectedRow.projOwnerId);
} }
// setClom(String(selectedRowKeys)) // setClom(String(selectedRowKeys))
// setbelongselectedKeys(selectedRowKeys) // setbelongselectedKeys(selectedRowKeys)
@ -770,13 +770,13 @@ export default function ProjEditStep2(props: any) {
/> />
</div> */} </div> */}
</div> </div>
<div className='showInfo' style={{alignItems:'center'}}> <div className='showInfo' style={{ alignItems: 'center' }}>
<div style={{ marginRight: '22px' }}>:</div> <div style={{ marginRight: '22px' }}>:</div>
<div style={{ display: authorName == '' ? 'block' : 'none' }}></div> <div style={{ display: authorName == '' ? 'block' : 'none' }}></div>
<div style={{ display: authorName == '' ? 'none' : 'block' }}> <div style={{ display: authorName == '' ? 'none' : 'block' }}>
{authorName}/{authorType == 'PERSONAL' ? '自然人' : '企业-组织'}/{authorIdCardType == 'ID_CARD' ? '身份证' : '营业执照'}/{authorIdCard} {authorName}/{authorType == 'PERSONAL' ? '自然人' : '企业-组织'}/{authorIdCardType == 'ID_CARD' ? '身份证' : '营业执照'}/{authorIdCard}
</div> </div>
<Button style={{ display: authorName == '' ? 'none' : 'block',height:30,marginLeft:10 }} onClick={()=>{ <Button style={{ display: authorName == '' ? 'none' : 'block', height: 30, marginLeft: 10 }} onClick={() => {
// lyp // lyp
setauthorName(''); setauthorName('');
setauthorIdCardType(''); setauthorIdCardType('');
@ -1355,7 +1355,11 @@ export default function ProjEditStep2(props: any) {
<Col span={12}> <Col span={12}>
<div className='blongNameInt blongSmallNamel promptBox'> <div className='blongNameInt blongSmallNamel promptBox'>
{/* <div className='blongTitle blongsmallTitle '>姓名或公司名称:</div> */} {/* <div className='blongTitle blongsmallTitle '>姓名或公司名称:</div> */}
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '姓名' : '公司名称'}</div> <div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '姓名' : '公司名称'}
<span style={{
color: 'red',
}}>*</span>
</div>
<Form.Item<BelongPeopleType> <Form.Item<BelongPeopleType>
// label="姓名或公司名称" // label="姓名或公司名称"
@ -1373,7 +1377,7 @@ export default function ProjEditStep2(props: any) {
</div> </div>
</Col> </Col>
<Col span={12}> {/* <Col span={12}>
<div className='blongNameInt blongSmallNameR'> <div className='blongNameInt blongSmallNameR'>
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '英文名' : '公司英文缩写'}</div> <div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '英文名' : '公司英文缩写'}</div>
@ -1397,6 +1401,29 @@ export default function ProjEditStep2(props: any) {
</Form.Item> </Form.Item>
</div> </div>
</Col> */}
<Col span={12}>
<div className='blongNameInt blongSmallNameR'>
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '身份证号' : '统一社会信用代码'}
<span style={{
color: 'red',
}}>*</span>
</div>
<Form.Item<BelongPeopleType>
// label="证件号"
name="authorIdCard"
rules={[{ required: true, message: '请输入证件号' }]}
>
<Input placeholder="请输入证件号"
style={{ height: '44px', width: '360px', fontSize: '15px', marginTop: '22px' }}
disabled={belongTitle == '查看所属者' ? true : false}
/>
</Form.Item>
<div className='prompt' style={{left:180}}>(:如有多个著作人{belongShow == 'PERSONAL' ? '身份证号' : '统一社会信用代码'})</div>
</div>
</Col> </Col>
@ -1423,11 +1450,12 @@ export default function ProjEditStep2(props: any) {
/> />
</Form.Item> </Form.Item>
</div> </div>
<Col span={12}> {/* <Col span={12}>
<div className='blongNameInt blongSmallNamel'> <div className='blongNameInt blongSmallNamel'>
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '身份证号' : '统一社会信用代码'}</div> <div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '身份证号' : '统一社会信用代码'}</div>
@ -1444,7 +1472,7 @@ export default function ProjEditStep2(props: any) {
</Form.Item> </Form.Item>
</div> </div>
</Col> </Col> */}
</Row></>} </Row></>}
<Row gutter={15}> <Row gutter={15}>
@ -1654,6 +1682,7 @@ export default function ProjEditStep2(props: any) {
<Modal <Modal
destroyOnClose destroyOnClose
okText="确认" okText="确认"
centered
// cancelText="取消" // cancelText="取消"
cancelText={contactTitle === '查看联系人' ? '返回' : '取消'} cancelText={contactTitle === '查看联系人' ? '返回' : '取消'}
open={isContantOpen} open={isContantOpen}
@ -1693,7 +1722,9 @@ export default function ProjEditStep2(props: any) {
autoComplete="off" autoComplete="off"
> >
<div className='blongNameInt'> <div className='blongNameInt'>
<div className='blongTitle ' style={{ width: 65, marginRight: '15px' }}>: </div> <div className='blongTitle ' style={{ width: 65, marginRight: '15px' }}><span style={{
color: 'red',
}}>*</span> : </div>
<Form.Item<ContactType> <Form.Item<ContactType>
@ -1708,7 +1739,9 @@ export default function ProjEditStep2(props: any) {
</Form.Item> </Form.Item>
</div> </div>
<div className='blongNameInt'> <div className='blongNameInt'>
<div className='blongTitle ' style={{ width: 65, marginRight: '15px' }}>: </div> <div className='blongTitle ' style={{ width: 65, marginRight: '15px' }}><span style={{
color: 'red',
}}>*</span> : </div>
<Form.Item<ContactType> <Form.Item<ContactType>
name="phone" name="phone"

View File

@ -21,6 +21,7 @@ type FieldType = {
projDevCompleteDate: Dayjs; projDevCompleteDate: Dayjs;
companyName: string; companyName: string;
companyNameEn: string; companyNameEn: string;
projName: string;
}; };
// 所属人信息类型 // 所属人信息类型
type BelongPeopleType = { type BelongPeopleType = {
@ -259,6 +260,7 @@ export default function ProjEditStep2() {
setAuthorId(data.authorId) setAuthorId(data.authorId)
setApplyConcatId(data.applyContactId) setApplyConcatId(data.applyContactId)
formInfo.setFieldsValue({ formInfo.setFieldsValue({
projName: data.projName,
projSubName: data.projSubName, projSubName: data.projSubName,
projVersion: data.projVersion, projVersion: data.projVersion,
projDevCompleteDate: data.projDevCompleteDate ? dayjs(data.projDevCompleteDate, 'YYYY-MM-DD') : '', projDevCompleteDate: data.projDevCompleteDate ? dayjs(data.projDevCompleteDate, 'YYYY-MM-DD') : '',
@ -519,17 +521,18 @@ export default function ProjEditStep2() {
<div className='projNameInt'> <div className='projNameInt'>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<div className='projTitle '> :</div> <div className='projTitle '> :</div>
<Form.Item<FieldType> <Form.Item<FieldType>
// label="项目简称" // label="项目简称"
name="projSubName" name="projName"
rules={[{ required: false, message: '请输入项目简称' }]} rules={[{ required: false, message: '请输入项目简称' }]}
> >
<Input <Input
style={{ height: '50px', width: '411px', fontSize: '16px' }} style={{ height: '50px', width: '411px', fontSize: '16px' }}
placeholder="请输入项目简称" /> // placeholder="请输入项目简称"
/>
</Form.Item> </Form.Item>
</div> </div>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>

View File

@ -39,7 +39,7 @@ import AgentSelect from "./agent/AgentSelect.tsx";
import AgentAgreement from "./agent/AgentAgreement.tsx"; import AgentAgreement from "./agent/AgentAgreement.tsx";
import AgentCorrection from "./agent/AgentCorrection.tsx"; import AgentCorrection from "./agent/AgentCorrection.tsx";
import AgentResult from "./agent/AgentResult.tsx"; import AgentResult from "./agent/AgentResult.tsx";
// import LoadingPage from './LoadingPage/LoadingPage.tsx'
export const router = createHashRouter( export const router = createHashRouter(
// [ // [
// { // {
@ -188,7 +188,11 @@ export const router = createHashRouter(
// }, // },
// ] // ]
[ [
// {
// path: '/loading',
// element: <LoadingPage />,
// },
{ {
path: '/', path: '/',
element: <Index />, element: <Index />,

View File

@ -14,10 +14,12 @@ axios.defaults.baseURL = 'http://192.168.0.15:7025/copyright';
export const WebSocketBaseUrl: string = 'ws://192.168.0.15:7025/copyright'; export const WebSocketBaseUrl: string = 'ws://192.168.0.15:7025/copyright';
// export const WebSocketBaseUrl: string = 'ws://192.168.0.103:7025/copyright'; // export const WebSocketBaseUrl: string = 'ws://192.168.0.103:7025/copyright';
// export const WebSocketBaseUrl: string = '/copyright'; // export const WebSocketBaseUrl: string = '/copyright';
export const DevUserId: string = '80d3365e-0597-4988-979e-18ef1c3ec671'; // 18634604067 export const DevUserId: string = '80d3365e-0597-4988-979e-18ef1c3ec671'; // 18634604067
// export const DevUserId: string = 'eb9a82a6-6ed3-4ba0-90e6-d836cefff915'; // 15042810561 密码123456 // export const DevUserId: string = 'eb9a82a6-6ed3-4ba0-90e6-d836cefff915'; // 15042810561 密码123456
// export const DevUserId: string = 'c2438eb8-2685-49a9-bf02-5111a5192d96'; // 18647109157 // export const DevUserId: string = 'c2438eb8-2685-49a9-bf02-5111a5192d96'; // 18647109157
// export const DevUserId: string = ''; // export const DevUserId: string = '';
// export const DevUserId = localStorage.getItem('userId')? localStorage.getItem('userId') : '';
type Req<T> = { type Req<T> = {
messageApi: MessageInstance; messageApi: MessageInstance;
@ -26,6 +28,7 @@ type Req<T> = {
config?: AxiosRequestConfig; config?: AxiosRequestConfig;
onBefore?(): void; onBefore?(): void;
onSuccess(data: AxiosResponse<T>): void; onSuccess(data: AxiosResponse<T>): void;
specialFlag?: string; // 添加特殊标识参数
onFinally?(): void; onFinally?(): void;
// onError?: (error: any) => void; // 添加 onError 属性 // onError?: (error: any) => void; // 添加 onError 属性
} }
@ -41,8 +44,18 @@ axios.interceptors.request.use(config => {
if (config.method === 'get') { if (config.method === 'get') {
config.data = { unused: 0 } // 这个是关键点解决get 请求添加不上content_type config.data = { unused: 0 } // 这个是关键点解决get 请求添加不上content_type
} }
config.headers['X-USER-ID'] = DevUserId; const token = sessionStorage.getItem('token')? sessionStorage.getItem('token') : '';
config.headers['X-SOURCE'] = 'page'; if (token) {
// 如果有token不添加 X-USER-ID 和 X-SOURCE
config.headers['Auth'] = `Bearer ${token}`;
} else {
config.headers['X-USER-ID'] = DevUserId;
config.headers['X-SOURCE'] = 'page';
// config.headers['Auth'] = '';
}
// config.headers['X-USER-ID'] = DevUserId;
// config.headers['X-SOURCE'] = 'page';
// config.headers['Auth'] =token? `Bearer ${token}`:'';
return config return config
}); });
@ -184,4 +197,9 @@ export function del<T>(req: Req<T>) {
}).finally(() => { }).finally(() => {
req.onFinally?.(); req.onFinally?.();
}) })
} }