版本更新
This commit is contained in:
parent
abebaf54e7
commit
458ae8efaf
73
src/App.tsx
73
src/App.tsx
@ -1,3 +1,4 @@
|
||||
|
||||
// 引入Provider
|
||||
import { Provider } from 'react-redux';
|
||||
// 引入仓库
|
||||
@ -12,10 +13,14 @@ import {
|
||||
GlobalDataActionType,
|
||||
GlobalDispatchContext,
|
||||
} 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 [isTokenFetched, setIsTokenFetched] = useState(false);
|
||||
const globalDataReducer = (state: GlobalData, action: GlobalDataAction) => {
|
||||
if (action.type == GlobalDataActionType.REFRESH_SELF) {
|
||||
if (action.user) {
|
||||
@ -39,20 +44,58 @@ const App: React.FC = () => {
|
||||
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;
|
@ -89,8 +89,8 @@ export default function BelongPeople(props: propsInfo) {
|
||||
const [authorType, setauthorType] = useState('') //所属人类型
|
||||
const [authorProvinceCity, setauthorProvinceCity] = useState('') //所属人省市
|
||||
const [authorCrcAccount, setauthorCrcAccount] = useState(0) //是否给账号 0 给 1 不给
|
||||
// const [authorCrcAccountPassword, setauthorCrcAccountPassword] = useState('') //密码
|
||||
// const [authorCrcAccountUsername, setauthorCrcAccountUsername] = useState('') //账号
|
||||
const [authorCrcAccountPassword, setauthorCrcAccountPassword] = useState('') //密码
|
||||
const [authorCrcAccountUsername, setauthorCrcAccountUsername] = useState('') //账号
|
||||
// // 从基本信息中获取到的两个表格默认选择的id 所属者id 联系人id
|
||||
const [authorId, setAuthorId] = useState('') //所属人id
|
||||
// 设置所属者more你选中的行
|
||||
@ -146,8 +146,8 @@ export default function BelongPeople(props: propsInfo) {
|
||||
// setauthorNameEn('');
|
||||
setauthorProvinceCity('');
|
||||
setauthorCrcAccount(0);
|
||||
// setauthorCrcAccountPassword('');
|
||||
// setauthorCrcAccountUsername('');
|
||||
setauthorCrcAccountPassword('');
|
||||
setauthorCrcAccountUsername('');
|
||||
setAuthorId('');
|
||||
} else {
|
||||
// 正常选中时,更新相关状态
|
||||
@ -160,8 +160,8 @@ export default function BelongPeople(props: propsInfo) {
|
||||
// setauthorNameEn(firstSelectedRow.nameEn);
|
||||
setauthorProvinceCity(firstSelectedRow.provinceCity);
|
||||
setauthorCrcAccount(firstSelectedRow.isCrcAccount);
|
||||
// setauthorCrcAccountPassword(firstSelectedRow.crcAccountPassword);
|
||||
// setauthorCrcAccountUsername(firstSelectedRow.crcAccountUsername);
|
||||
setauthorCrcAccountPassword(firstSelectedRow.crcAccountPassword);
|
||||
setauthorCrcAccountUsername(firstSelectedRow.crcAccountUsername);
|
||||
setAuthorId(firstSelectedRow.projOwnerId);
|
||||
}
|
||||
|
||||
@ -518,7 +518,7 @@ export default function BelongPeople(props: propsInfo) {
|
||||
<div style={{ display: authorName ? 'block' : 'none' }}>
|
||||
{authorName}/{authorType == 'PERSONAL' ? '自然人' : '企业-组织'}/{authorIdCardType == 'ID_CARD' ? '身份证' : '营业执照'}/{authorIdCard}
|
||||
</div>
|
||||
<Button style={{ display: authorName ? 'block' : 'none', height: 30, marginLeft: 10 }} onClick={() => {
|
||||
{/* <Button style={{ display: authorName ? 'block' : 'none', height: 30, marginLeft: 10 }} onClick={() => {
|
||||
// lyp
|
||||
setauthorName('');
|
||||
setauthorIdCardType('');
|
||||
@ -527,8 +527,11 @@ export default function BelongPeople(props: propsInfo) {
|
||||
setauthorProvinceCity('');
|
||||
setAuthorId('');
|
||||
setSelectedRowKeys([]);
|
||||
|
||||
}}>取消</Button>
|
||||
setauthorCrcAccount(0);
|
||||
setauthorCrcAccountPassword('');
|
||||
setauthorCrcAccountUsername('');
|
||||
|
||||
}}>取消</Button> */}
|
||||
</div>
|
||||
</>) : (<>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
@ -544,9 +547,11 @@ export default function BelongPeople(props: propsInfo) {
|
||||
authorType: '',
|
||||
authorIdCardType: '',
|
||||
authorIdCard: '',
|
||||
authorCrcAccount: '',
|
||||
authorCrcAccount: 0,
|
||||
authorId: '',
|
||||
authorProvinceCity: ''
|
||||
authorProvinceCity: '',
|
||||
authorCrcAccountPassword: '',
|
||||
authorCrcAccountUsername: '',
|
||||
})
|
||||
}}>取消</Button>
|
||||
|
||||
@ -874,13 +879,17 @@ export default function BelongPeople(props: propsInfo) {
|
||||
<div style={{ display: props.isShow ? 'block' : 'none' }}>
|
||||
<div className="belongPeopleModal-btn" style={{ display: 'flex', justifyContent: 'flex-end' }} >
|
||||
<Button onClick={() => {
|
||||
|
||||
|
||||
props.closeModal()
|
||||
}}>取消</Button>
|
||||
<Button style={{
|
||||
marginLeft: 20
|
||||
}} type="primary"
|
||||
onClick={() => {
|
||||
if ( !authorName) {
|
||||
messageApi.error('请选择所属者')
|
||||
return
|
||||
}
|
||||
if (props.belongPeopleInfo.authorId && !authorId) {
|
||||
props.closeModal()
|
||||
return
|
||||
@ -893,7 +902,9 @@ export default function BelongPeople(props: propsInfo) {
|
||||
|
||||
authorCrcAccount,
|
||||
authorId,
|
||||
authorProvinceCity
|
||||
authorProvinceCity,
|
||||
authorCrcAccountPassword,
|
||||
authorCrcAccountUsername,
|
||||
})
|
||||
props.setValue(authorName)
|
||||
props.closeModal()
|
||||
@ -989,7 +1000,11 @@ export default function BelongPeople(props: propsInfo) {
|
||||
<Col span={12}>
|
||||
<div className='blongNameInt blongSmallNamel promptBox'>
|
||||
{/* <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>
|
||||
// label="姓名或公司名称"
|
||||
@ -1008,7 +1023,7 @@ export default function BelongPeople(props: propsInfo) {
|
||||
</div>
|
||||
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
{/* <Col span={12}>
|
||||
<div className='blongNameInt blongSmallNameR'>
|
||||
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '英文名' : '公司英文缩写'}</div>
|
||||
|
||||
@ -1031,8 +1046,30 @@ export default function BelongPeople(props: propsInfo) {
|
||||
</Form.Item>
|
||||
</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 gutter={15}>
|
||||
@ -1061,7 +1098,7 @@ export default function BelongPeople(props: propsInfo) {
|
||||
|
||||
|
||||
|
||||
<Col span={12}>
|
||||
{/* <Col span={12}>
|
||||
<div className='blongNameInt blongSmallNamel'>
|
||||
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '身份证号' : '统一社会信用代码'}</div>
|
||||
|
||||
@ -1078,7 +1115,7 @@ export default function BelongPeople(props: propsInfo) {
|
||||
</Form.Item>
|
||||
</div>
|
||||
|
||||
</Col>
|
||||
</Col> */}
|
||||
</Row></>}
|
||||
|
||||
<Row gutter={15}>
|
||||
|
@ -472,6 +472,7 @@ export default function ContactPeople(props: any) {
|
||||
<Modal
|
||||
destroyOnClose
|
||||
okText="确认"
|
||||
centered
|
||||
// cancelText="取消"
|
||||
cancelText={contactTitle === '查看联系人' ? '返回' : '取消'}
|
||||
open={isContantOpen}
|
||||
@ -511,7 +512,9 @@ export default function ContactPeople(props: any) {
|
||||
autoComplete="off"
|
||||
>
|
||||
<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>
|
||||
@ -526,7 +529,9 @@ export default function ContactPeople(props: any) {
|
||||
</Form.Item>
|
||||
</div>
|
||||
<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>
|
||||
name="phone"
|
||||
|
@ -91,7 +91,7 @@ export default function ContractModal(props: any) {
|
||||
>
|
||||
<div className='refunModal-item'>
|
||||
<div className='refunModal-title'>
|
||||
甲方姓名<span className='refunModal-red'>*</span>
|
||||
甲方名称<span className='refunModal-red'>*</span>
|
||||
</div>
|
||||
<div className='refunInput'>
|
||||
|
||||
@ -123,11 +123,11 @@ export default function ContractModal(props: any) {
|
||||
<Form.Item
|
||||
name="phone"
|
||||
rules={[
|
||||
{required: true, message: '请输入联联系电话!'},
|
||||
{
|
||||
pattern: /^1[3456789]\d{9}$/,
|
||||
message: '请输入正确的手机号码',
|
||||
},
|
||||
{required: true, message: '请输入联系电话!'},
|
||||
// {
|
||||
// pattern: /^1[3456789]\d{9}$/,
|
||||
// message: '请输入正确的手机号码',
|
||||
// },
|
||||
]}
|
||||
>
|
||||
<Input
|
||||
|
@ -3,7 +3,7 @@ export default function ContractText(props: any) {
|
||||
const height = window.innerHeight - 200;
|
||||
return (
|
||||
<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='contractBox'>
|
||||
<div>甲方名称:<span className='contractLine'>{props.name}</span></div>
|
||||
@ -12,18 +12,18 @@ export default function ContractText(props: any) {
|
||||
</div>
|
||||
|
||||
<div className='contractBox'>
|
||||
<div>乙方名称:<span className='contractLine'>山西腾狮科技股份有限公司(以下简称“AI秒著引擎平台”)</span></div>
|
||||
<div>联系地址:<span className='contractLine'>山西省晋中市山西综改示范区晋中开发区大学城产业园区龙田路909号创新创业孵化转化中心B6号楼9层0910室</span></div>
|
||||
<div>乙方名称:<span className='contractLine'>河北雄安秒著科技有限公司(以下简称“AI喵著网”)</span></div>
|
||||
<div>联系地址:<span className='contractLine'>中国(河北)自由贸易试验区雄安片区容东明朗南街131号</span></div>
|
||||
<div>联系电话:<span className='contractLine'>400-086-1633</span></div>
|
||||
</div>
|
||||
<div className='contractBox'>
|
||||
<div className='contractText'>甲乙双方在平等互利基础上一致同意建立友好合作关系,根据《中华人民共和国民法典》之规定,由乙方向甲方有偿提供AI秒著引擎平台在线服务,并达成本协议。</div>
|
||||
<div className='contractText'>甲乙双方在平等互利基础上一致同意建立友好合作关系,根据《中华人民共和国民法典》之规定,由乙方向甲方有偿提供AI喵著网在线服务,并达成本协议。</div>
|
||||
</div>
|
||||
|
||||
<div className='contractBox'>
|
||||
<div className='contractTitleTwo contractTextBold'>一、服务内容</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.1 根据甲乙双方约定,甲方同意由乙方负责实施甲方通过乙方AI喵著网(网址:https://www.aimzhu.com/)所下单的相关业务,甲方在AI喵著网上注册账户,其注册的下单账号为:***********。</div>
|
||||
<div className='contractText'>1.2 根据甲乙双方约定,乙方为甲方通过AI喵著网提供相关服务,服务内容以甲方通过AI喵著网具体下单选择的服务类型为准。平台提供的服务类型有全托管与写材料两类,服务清单如下所示:</div>
|
||||
<table border={1} style={{ borderCollapse: 'collapse', width: '100%' ,marginTop:10}}>
|
||||
|
||||
<tbody>
|
||||
@ -97,7 +97,7 @@ export default function ContractText(props: any) {
|
||||
<div className='contractTitleTwo contractTextBold'>二、服务价格以及付款方式</div>
|
||||
<div className='contractText'>2.1 金额:以平台在线充值为准。</div>
|
||||
<div className='contractText'>2.2 付款方式:详细操作按乙方网站(https://www.aimzhu.com/)上付款页面进行。付款后甲方可在线登记发票信息,登记后3个工作日内乙方开具数电发票通过平台发送给甲方注册的账号,甲方可自行下载。</div>
|
||||
<div className='contractText'>2.3服务价格:服务价格以通过AI秒著引擎平台下单时显示价格为准。乙方有权调整价格,乙方保证价格不会高于甲方注册账号后第一次下单的价格。</div>
|
||||
<div className='contractText'>2.3服务价格:服务价格以通过AI喵著网下单时显示价格为准。乙方有权调整价格,乙方保证价格不会高于甲方注册账号后第一次下单的价格。</div>
|
||||
</div>
|
||||
|
||||
<div className='contractBox'>
|
||||
@ -128,9 +128,9 @@ export default function ContractText(props: any) {
|
||||
|
||||
<div className='contractBox'>
|
||||
<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.3 甲方承诺使用AI秒著引擎平台搭建的可运行系统用于合法的目的和用途,在可运行系统上不得发布涉密与违反法律规范的信息,乙方有权查看甲方在可运行系统上发布的相关信息,并有权对违规信息进行删除。</div>
|
||||
<div className='contractText'>5.3 甲方承诺使用AI喵著网搭建的可运行系统用于合法的目的和用途,在可运行系统上不得发布涉密与违反法律规范的信息,乙方有权查看甲方在可运行系统上发布的相关信息,并有权对违规信息进行删除。</div>
|
||||
</div>
|
||||
|
||||
<div className='contractBox'>
|
||||
@ -146,7 +146,7 @@ export default function ContractText(props: any) {
|
||||
<div className='contractText'>7.1 由于地震、战争、洪水、国家政策等不可抗力;</div>
|
||||
<div className='contractText'>7.2 由于服务器网络接入服务提供商(电信、网通、IDC机房等)原因造成的网络中断;</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>
|
||||
|
||||
@ -158,7 +158,7 @@ export default function ContractText(props: any) {
|
||||
|
||||
<div className='contractBox'>
|
||||
<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.3本协议自甲方向乙方支付本协议2.1条的服务费用时或使用乙方所提供的有尝服务时生效。</div>
|
||||
<div className='contractText'>9.4 本协议未尽事宜,双方经友好协商可达成补充协议,补充协议与本协议不一致的,以补充协议为准。</div>
|
||||
@ -176,7 +176,7 @@ export default function ContractText(props: any) {
|
||||
<div className='contractText'>日 期: </div>
|
||||
</div>
|
||||
<div className='contractBox'>
|
||||
<div className='contractText' >乙 方:<span className='contractLine'>山西腾狮科技股份有限公司</span></div>
|
||||
<div className='contractText' >乙 方:<span className='contractLine'>河北雄安秒著科技有限公司</span></div>
|
||||
<div className='contractText signBox'>
|
||||
<div>乙方授权代表签字:</div>
|
||||
<div className='sign'></div>
|
||||
|
@ -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 {listDictionary, IDictionary, get, put} from "../../util/AjaxUtils.ts";
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
@ -26,6 +26,7 @@ type EditProps = {
|
||||
invoiceId: string;
|
||||
handleOk: () => void;
|
||||
handleCancel: () => void;
|
||||
// invdataArray: any[];
|
||||
}
|
||||
|
||||
export default function InvoiceEdit(props: EditProps) {
|
||||
@ -63,6 +64,7 @@ export default function InvoiceEdit(props: EditProps) {
|
||||
setOrderAmount((data.invoiceAmount / 100).toFixed(2));
|
||||
}
|
||||
})
|
||||
|
||||
}, []);
|
||||
|
||||
return (
|
||||
@ -76,6 +78,7 @@ export default function InvoiceEdit(props: EditProps) {
|
||||
onFinish={(values) => {
|
||||
modal.confirm({
|
||||
title: '提示',
|
||||
centered: true,
|
||||
content: '确定提交吗?',
|
||||
okText: '确定',
|
||||
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">
|
||||
<colgroup>
|
||||
<col width="120"/>
|
||||
@ -288,7 +291,226 @@ export default function InvoiceEdit(props: EditProps) {
|
||||
</td>
|
||||
</tr>
|
||||
</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'}}>
|
||||
<Flex justify="center" style={{marginTop: '15px'}}>
|
||||
<Space>
|
||||
@ -306,6 +528,7 @@ export default function InvoiceEdit(props: EditProps) {
|
||||
title="开票信息"
|
||||
width={1000}
|
||||
footer={false}
|
||||
destroyOnClose
|
||||
onCancel={() => setIsInvoiceInfoListOpen(false)}
|
||||
>
|
||||
<InvoiceInfoList
|
||||
|
@ -1,8 +1,12 @@
|
||||
import {Button, Dropdown, Flex, MenuProps, Modal, Popconfirm, Space, Table, TableProps, Tag} from "antd";
|
||||
import {PlusOutlined} from "@ant-design/icons";
|
||||
import {useEffect, useRef, useState} from "react";
|
||||
import {get, put} from "../../util/AjaxUtils.ts";
|
||||
import {IListPage} from "../../interfaces/listpage/IListPage.ts";
|
||||
import { Button, Dropdown, Flex, MenuProps, Modal, Popconfirm, Space, Table, TableProps, Tag } from "antd";
|
||||
import { PlusOutlined } from "@ant-design/icons";
|
||||
import {
|
||||
useEffect,
|
||||
// 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 InvoiceSave from "./InvoiceSave.tsx";
|
||||
import InvoiceEdit from "./InvoiceEdit.tsx";
|
||||
@ -44,8 +48,9 @@ export default function InvoiceList() {
|
||||
const [isSaveModalOpen, setIsSaveModalOpen] = useState(false);
|
||||
const [isEditModalOpen, setIsEditModalOpen] = 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'] = [
|
||||
{
|
||||
title: '名称',
|
||||
@ -111,16 +116,16 @@ export default function InvoiceList() {
|
||||
width: 100,
|
||||
fixed: 'right',
|
||||
render: (value) => {
|
||||
if(value === InvoiceStatusEnum.PENDING) {
|
||||
if (value === InvoiceStatusEnum.PENDING) {
|
||||
return <Tag color="magenta">待审核</Tag>
|
||||
}
|
||||
if(value === InvoiceStatusEnum.COMPLETE) {
|
||||
if (value === InvoiceStatusEnum.COMPLETE) {
|
||||
return <Tag color="green">已开票</Tag>
|
||||
}
|
||||
if(value === InvoiceStatusEnum.FAILED) {
|
||||
if (value === InvoiceStatusEnum.FAILED) {
|
||||
return <Tag color="red">失败</Tag>
|
||||
}
|
||||
if(value === InvoiceStatusEnum.CANCEL) {
|
||||
if (value === InvoiceStatusEnum.CANCEL) {
|
||||
return <Tag color="cyan">已取消</Tag>
|
||||
}
|
||||
}
|
||||
@ -132,14 +137,16 @@ export default function InvoiceList() {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
render: (_value, record) => {
|
||||
if(record.invoiceStatus === InvoiceStatusEnum.PENDING) {
|
||||
if (record.invoiceStatus === InvoiceStatusEnum.PENDING) {
|
||||
return <Flex justify="center">
|
||||
<Space>
|
||||
<Button type="link" style={{
|
||||
color: 'var(--color-dark)',
|
||||
padding: '0'
|
||||
}} onClick={() => {
|
||||
invoiceId.current = record.invoiceId;
|
||||
// invoiceId.current = record.invoiceId;
|
||||
// console.log(record.invoiceId);
|
||||
setInvoiceId(record.invoiceId);
|
||||
setIsShowModalOpen(true);
|
||||
}}>查看</Button>
|
||||
<Popconfirm
|
||||
@ -172,15 +179,17 @@ export default function InvoiceList() {
|
||||
</Space>
|
||||
</Flex>
|
||||
}
|
||||
if(record.invoiceStatus === InvoiceStatusEnum.CANCEL) {
|
||||
if (record.invoiceStatus === InvoiceStatusEnum.CANCEL) {
|
||||
return <Button type="link" style={{
|
||||
padding: '0'
|
||||
}} onClick={() => {
|
||||
invoiceId.current = record.invoiceId;
|
||||
// invoiceId.current = record.invoiceId;
|
||||
console.log(record.invoiceId);
|
||||
setInvoiceId(record.invoiceId);
|
||||
setIsEditModalOpen(true);
|
||||
}}>编辑</Button>
|
||||
}
|
||||
if(record.invoiceStatus == InvoiceStatusEnum.COMPLETE) {
|
||||
if (record.invoiceStatus == InvoiceStatusEnum.COMPLETE) {
|
||||
const items: MenuProps['items'] = [];
|
||||
record.invoiceFileList.forEach((item, index) => {
|
||||
items.push({
|
||||
@ -210,7 +219,7 @@ export default function InvoiceList() {
|
||||
rows: 20
|
||||
}
|
||||
},
|
||||
onSuccess({data}) {
|
||||
onSuccess({ data }) {
|
||||
setPage(data.page);
|
||||
setTotal(data.total);
|
||||
setDataArray(data.rows);
|
||||
@ -226,26 +235,30 @@ export default function InvoiceList() {
|
||||
<>
|
||||
<div className="invoice-list-container">
|
||||
<div className="mod-list">
|
||||
<div className="table-btn-group" style={{marginBottom: '15px'}}>
|
||||
<div className="table-btn-group" style={{ marginBottom: '15px' }}>
|
||||
<Button value="small" onClick={() => {
|
||||
setIsSaveModalOpen(true);
|
||||
}}><PlusOutlined/> 新增</Button>
|
||||
}}><PlusOutlined /> 新增</Button>
|
||||
</div>
|
||||
<Table columns={columns} dataSource={dataArray} pagination={
|
||||
{
|
||||
pageSize: 20,
|
||||
total: total,
|
||||
onChange: (currentPage) => {
|
||||
setPage(currentPage);
|
||||
setPage(currentPage);
|
||||
},
|
||||
}
|
||||
} scroll={{y: 500}} bordered key="dataTable" rowKey="invoiceId"/>
|
||||
} scroll={{ y: 500 }} bordered key="dataTable" rowKey="invoiceId" />
|
||||
</div>
|
||||
</div>
|
||||
<Modal open={isSaveModalOpen}
|
||||
title="申请开票"
|
||||
footer={false}
|
||||
onCancel={() => setIsSaveModalOpen(false)}
|
||||
centered
|
||||
title="申请开票"
|
||||
footer={false}
|
||||
onCancel={() => setIsSaveModalOpen(false)}
|
||||
width={1000}
|
||||
destroyOnClose
|
||||
|
||||
>
|
||||
<InvoiceSave
|
||||
handleOk={() => {
|
||||
@ -258,12 +271,16 @@ export default function InvoiceList() {
|
||||
/>
|
||||
</Modal>
|
||||
<Modal open={isEditModalOpen}
|
||||
title="修改开票信息"
|
||||
footer={false}
|
||||
onCancel={() => setIsEditModalOpen(false)}
|
||||
centered
|
||||
width={1000}
|
||||
title="修改开票信息"
|
||||
footer={false}
|
||||
onCancel={() => setIsEditModalOpen(false)}
|
||||
destroyOnClose
|
||||
>
|
||||
<InvoiceEdit
|
||||
invoiceId={invoiceId.current}
|
||||
invoiceId={invoiceId}
|
||||
// invdataArray={invdataArray}
|
||||
handleOk={() => {
|
||||
getData();
|
||||
setIsEditModalOpen(false);
|
||||
@ -274,12 +291,15 @@ export default function InvoiceList() {
|
||||
/>
|
||||
</Modal>
|
||||
<Modal open={isShowModalOpen}
|
||||
title="查看开票信息"
|
||||
footer={false}
|
||||
onCancel={() => setIsShowModalOpen(false)}
|
||||
destroyOnClose
|
||||
title="查看开票信息"
|
||||
footer={false}
|
||||
onCancel={() => setIsShowModalOpen(false)}
|
||||
centered
|
||||
>
|
||||
{/* {invoiceId.current} */}
|
||||
<InvoiceShow
|
||||
invoiceId={invoiceId.current}
|
||||
invoiceId={invoiceId}
|
||||
/>
|
||||
</Modal>
|
||||
{messageContext}
|
||||
|
40
src/components/invoice/InvoiceSave.css
Normal file
40
src/components/invoice/InvoiceSave.css
Normal 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;
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
import {Button, Divider, Flex, Form, Input, Modal, Radio, Space} from "antd";
|
||||
import {useEffect, useState} from "react";
|
||||
import {listDictionary, IDictionary, post} from "../../util/AjaxUtils.ts";
|
||||
import { Button, Flex, Form, Input, Modal, Radio, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import { listDictionary, IDictionary, post } from "../../util/AjaxUtils.ts";
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
import InvoiceInfoList from "./info/InvoiceInfoList.tsx";
|
||||
import InvoiceOrderList from "./order/InvoiceOrderList.tsx";
|
||||
import useModal from "antd/es/modal/useModal";
|
||||
|
||||
import './InvoiceSave.css'
|
||||
type FormFieldType = {
|
||||
invoiceTitle: string;
|
||||
invoiceNo: string;
|
||||
@ -58,14 +58,16 @@ export default function InvoiceSave(props: SaveProps) {
|
||||
{modalContext}
|
||||
<Form
|
||||
name="basic"
|
||||
initialValues={{isSaveInvoiceInfo: 0}}
|
||||
initialValues={{ isSaveInvoiceInfo: 0 }}
|
||||
form={form}
|
||||
|
||||
onFinish={(values) => {
|
||||
modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定提交吗?',
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
centered: true,
|
||||
okButtonProps: {
|
||||
style: {
|
||||
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">
|
||||
<colgroup>
|
||||
<col width="120"/>
|
||||
<col/>
|
||||
<col width="120" />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colSpan={2}>
|
||||
<Button type="link" onClick={() => {
|
||||
setIsInvoiceInfoListOpen(true);
|
||||
}}>选择开票信息</Button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">公司名称 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoiceTitle"
|
||||
style={{marginBottom: '0'}}
|
||||
rules={[{required: true, message: '请输入公司名称'}]}
|
||||
>
|
||||
<Input placeholder="请输入公司名称"/>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">纳税人识别号 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoiceNo"
|
||||
style={{marginBottom: '0'}}
|
||||
rules={[{required: true, message: '请输入纳税人识别号'}]}
|
||||
>
|
||||
<Input placeholder="请输入纳税人识别号"/>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">公司地址 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoiceAddress"
|
||||
style={{marginBottom: '0'}}
|
||||
rules={[{required: true, message: '请输入公司地址'}]}
|
||||
>
|
||||
<Input placeholder="请输入公司地址"/>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">联系电话 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoicePhone"
|
||||
style={{marginBottom: '0'}}
|
||||
rules={[{required: true, message: '请输入联系电话'}]}
|
||||
>
|
||||
<Input placeholder="请输入联系电话"/>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开户行 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoiceAccount"
|
||||
style={{marginBottom: '0'}}
|
||||
rules={[{required: true, message: '请输入开户行'}]}
|
||||
>
|
||||
<Input placeholder="请输入开户行"/>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开户行账号 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoiceBank"
|
||||
style={{marginBottom: '0'}}
|
||||
rules={[{required: true, message: '请输入开户行账号'}]}
|
||||
>
|
||||
<Input placeholder="请输入开户行账号"/>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票内容 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="content"
|
||||
style={{marginBottom: '0'}}
|
||||
rules={[{required: true, message: '请选择开票内容'}]}
|
||||
>
|
||||
<Radio.Group>
|
||||
<Space direction="vertical">
|
||||
{contentArray.map(item => <Radio value={item.dataName}
|
||||
key={item.dataId}>{item.dataName}</Radio>)}
|
||||
</Space>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票税率 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="rate"
|
||||
style={{marginBottom: '0'}}
|
||||
rules={[{required: true, message: '请选择开票税率'}]}
|
||||
>
|
||||
<Radio.Group>
|
||||
{rateArray.map(item => <Radio value={item.dataName}
|
||||
key={item.dataId}>{item.dataName}</Radio>)}
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">发票类型 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="type"
|
||||
style={{marginBottom: '0'}}
|
||||
rules={[{required: true, message: '请选择发票类型'}]}
|
||||
>
|
||||
<Radio.Group>
|
||||
<Space direction="vertical">
|
||||
{typeArray.map(item => <Radio value={item.dataName}
|
||||
key={item.dataId}>{item.dataName}</Radio>)}
|
||||
</Space>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colSpan={2}>
|
||||
<Button type="link" onClick={() => {
|
||||
setIsInvoiceInfoListOpen(true);
|
||||
}}>选择开票信息</Button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">公司名称 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoiceTitle"
|
||||
style={{ marginBottom: '0' }}
|
||||
rules={[{ required: true, message: '请输入公司名称' }]}
|
||||
>
|
||||
<Input placeholder="请输入公司名称" />
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">纳税人识别号 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoiceNo"
|
||||
style={{ marginBottom: '0' }}
|
||||
rules={[{ required: true, message: '请输入纳税人识别号' }]}
|
||||
>
|
||||
<Input placeholder="请输入纳税人识别号" />
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">公司地址 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoiceAddress"
|
||||
style={{ marginBottom: '0' }}
|
||||
rules={[{ required: true, message: '请输入公司地址' }]}
|
||||
>
|
||||
<Input placeholder="请输入公司地址" />
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">联系电话 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoicePhone"
|
||||
style={{ marginBottom: '0' }}
|
||||
rules={[{ required: true, message: '请输入联系电话' }]}
|
||||
>
|
||||
<Input placeholder="请输入联系电话" />
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开户行 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoiceAccount"
|
||||
style={{ marginBottom: '0' }}
|
||||
rules={[{ required: true, message: '请输入开户行' }]}
|
||||
>
|
||||
<Input placeholder="请输入开户行" />
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开户行账号 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoiceBank"
|
||||
style={{ marginBottom: '0' }}
|
||||
rules={[{ required: true, message: '请输入开户行账号' }]}
|
||||
>
|
||||
<Input placeholder="请输入开户行账号" />
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票内容 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="content"
|
||||
style={{ marginBottom: '0' }}
|
||||
rules={[{ required: true, message: '请选择开票内容' }]}
|
||||
>
|
||||
<Radio.Group>
|
||||
<Space direction="vertical">
|
||||
{contentArray.map(item => <Radio value={item.dataName}
|
||||
key={item.dataId}>{item.dataName}</Radio>)}
|
||||
</Space>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票税率 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="rate"
|
||||
style={{ marginBottom: '0' }}
|
||||
rules={[{ required: true, message: '请选择开票税率' }]}
|
||||
>
|
||||
<Radio.Group>
|
||||
{rateArray.map(item => <Radio value={item.dataName}
|
||||
key={item.dataId}>{item.dataName}</Radio>)}
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">发票类型 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="type"
|
||||
style={{ marginBottom: '0' }}
|
||||
rules={[{ required: true, message: '请选择发票类型' }]}
|
||||
>
|
||||
<Radio.Group>
|
||||
<Space direction="vertical">
|
||||
{typeArray.map(item => <Radio value={item.dataName}
|
||||
key={item.dataId}>{item.dataName}</Radio>)}
|
||||
</Space>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td className="table-label">保存开票信息 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="isSaveInvoiceInfo"
|
||||
style={{marginBottom: '0'}}
|
||||
>
|
||||
<Radio.Group>
|
||||
<Radio value={0}>否</Radio>
|
||||
<Radio value={1}>是</Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">保存开票信息 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="isSaveInvoiceInfo"
|
||||
style={{ marginBottom: '0' }}
|
||||
>
|
||||
<Radio.Group>
|
||||
<Radio value={0}>否</Radio>
|
||||
<Radio value={1}>是</Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<Divider orientation="left" plain>开票内容</Divider>
|
||||
<table className="pay-table">
|
||||
<colgroup>
|
||||
<col width="120"/>
|
||||
<col/>
|
||||
<col width="120" />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td className="table-label">开票金额 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="orderIds"
|
||||
style={{marginBottom: '0'}}
|
||||
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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票备注</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoiceNote"
|
||||
style={{marginBottom: '0'}}
|
||||
>
|
||||
<Input.TextArea placeholder="请输入开票备注" rows={4}/>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票金额 *</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="orderIds"
|
||||
style={{ marginBottom: '0' }}
|
||||
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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票备注</td>
|
||||
<td>
|
||||
<Form.Item
|
||||
name="invoiceNote"
|
||||
style={{ marginBottom: '0' }}
|
||||
>
|
||||
<Input.TextArea placeholder="请输入开票备注" rows={4} />
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<Form.Item style={{marginBottom: '0'}}>
|
||||
<Flex justify="center" style={{marginTop: '15px'}}>
|
||||
</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' }}>
|
||||
<Flex justify="center" style={{ marginTop: '15px' }}>
|
||||
<Space>
|
||||
<Button type="primary" htmlType="submit" style={{
|
||||
backgroundColor: 'var(--color-primary)'
|
||||
@ -290,12 +512,14 @@ export default function InvoiceSave(props: SaveProps) {
|
||||
</Form.Item>
|
||||
</Form>
|
||||
<Modal open={isInvoiceInfoListOpen}
|
||||
title="开票信息"
|
||||
width={1000}
|
||||
footer={false}
|
||||
onCancel={() => {
|
||||
setIsInvoiceInfoListOpen(false);
|
||||
}}
|
||||
destroyOnClose
|
||||
centered
|
||||
title="开票信息"
|
||||
width={1000}
|
||||
footer={false}
|
||||
onCancel={() => {
|
||||
setIsInvoiceInfoListOpen(false);
|
||||
}}
|
||||
>
|
||||
<InvoiceInfoList
|
||||
handleOk={(selectedInvoice) => {
|
||||
@ -315,10 +539,10 @@ export default function InvoiceSave(props: SaveProps) {
|
||||
/>
|
||||
</Modal>
|
||||
<Modal open={isInvoiceOrderListOpen}
|
||||
title="开票订单"
|
||||
width={1000}
|
||||
footer={false}
|
||||
onCancel={() => setIsInvoiceOrderListOpen(false)}
|
||||
title="开票订单"
|
||||
width={1000}
|
||||
footer={false}
|
||||
onCancel={() => setIsInvoiceOrderListOpen(false)}
|
||||
>
|
||||
<InvoiceOrderList
|
||||
handleOk={(selectedOrders) => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {Button, Divider, Modal} from "antd";
|
||||
import {useEffect, useState} from "react";
|
||||
import {get} from "../../util/AjaxUtils.ts";
|
||||
import { Button, Divider, Modal } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import { get } from "../../util/AjaxUtils.ts";
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
import InvoiceInfoSelectedList from "./order/InvoiceOrderSelectedList.tsx"
|
||||
|
||||
@ -31,19 +31,22 @@ export default function InvoiceShow(props: ShowProps) {
|
||||
const [orderAmount, setOrderAmount] = useState('0');
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
|
||||
if (!props.invoiceId) {
|
||||
return;
|
||||
}
|
||||
get<DataType>({
|
||||
messageApi,
|
||||
url: `/api/invoice/get/${props.invoiceId}`,
|
||||
onSuccess({data}) {
|
||||
onSuccess({ data }) {
|
||||
setInvoiceData({
|
||||
...data
|
||||
});
|
||||
setOrderAmount((data.invoiceAmount / 100).toFixed(2));
|
||||
}
|
||||
})
|
||||
|
||||
}, []);
|
||||
|
||||
return (
|
||||
@ -52,80 +55,81 @@ export default function InvoiceShow(props: ShowProps) {
|
||||
<Divider orientation="left" plain>开票信息</Divider>
|
||||
<table className="pay-table">
|
||||
<colgroup>
|
||||
<col width="120"/>
|
||||
<col/>
|
||||
<col width="120" />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td className="table-label">公司名称 *</td>
|
||||
<td>{invoiceData?.invoiceTitle}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">纳税人识别号 *</td>
|
||||
<td>{invoiceData?.invoiceNo}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">公司地址 *</td>
|
||||
<td>{invoiceData?.invoiceAddress}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">联系电话 *</td>
|
||||
<td>{invoiceData?.invoicePhone}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开户行 *</td>
|
||||
<td>{invoiceData?.invoiceAccount}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开户行账号 *</td>
|
||||
<td>{invoiceData?.invoiceBank}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票内容 *</td>
|
||||
<td>{invoiceData?.content}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票税率 *</td>
|
||||
<td>{invoiceData?.rate}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">发票类型 *</td>
|
||||
<td>{invoiceData?.type}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">公司名称 *</td>
|
||||
<td>{invoiceData?.invoiceTitle}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">纳税人识别号 *</td>
|
||||
<td>{invoiceData?.invoiceNo}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">公司地址 *</td>
|
||||
<td>{invoiceData?.invoiceAddress}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">联系电话 *</td>
|
||||
<td>{invoiceData?.invoicePhone}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开户行 *</td>
|
||||
<td>{invoiceData?.invoiceAccount}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开户行账号 *</td>
|
||||
<td>{invoiceData?.invoiceBank}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票内容 *</td>
|
||||
<td>{invoiceData?.content}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票税率 *</td>
|
||||
<td>{invoiceData?.rate}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">发票类型 *</td>
|
||||
<td>{invoiceData?.type}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<Divider orientation="left" plain>开票内容</Divider>
|
||||
<table className="pay-table">
|
||||
<colgroup>
|
||||
<col width="120"/>
|
||||
<col/>
|
||||
<col width="120" />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td className="table-label">开票金额 *</td>
|
||||
<td>
|
||||
<div>
|
||||
<span>¥</span>
|
||||
<span style={{fontSize: '20px', fontWeight: 'bold'}}>{orderAmount}</span>
|
||||
<Button type="link" size="small" onClick={() => {
|
||||
setIsInvoiceOrderListOpen(true);
|
||||
}}>查看开票的订单</Button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票备注</td>
|
||||
<td>{invoiceData?.invoiceNote}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票金额 *</td>
|
||||
<td>
|
||||
<div>
|
||||
<span>¥</span>
|
||||
<span style={{ fontSize: '20px', fontWeight: 'bold' }}>{orderAmount}</span>
|
||||
<Button type="link" size="small" onClick={() => {
|
||||
setIsInvoiceOrderListOpen(true);
|
||||
}}>查看开票的订单</Button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开票备注</td>
|
||||
<td>{invoiceData?.invoiceNote}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<Modal open={isInvoiceOrderListOpen}
|
||||
title="开票订单"
|
||||
width={1000}
|
||||
footer={false}
|
||||
onCancel={() => setIsInvoiceOrderListOpen(false)}
|
||||
centered
|
||||
title="开票订单"
|
||||
width={1000}
|
||||
footer={false}
|
||||
onCancel={() => setIsInvoiceOrderListOpen(false)}
|
||||
>
|
||||
<InvoiceInfoSelectedList invoiceId={props.invoiceId}/>
|
||||
<InvoiceInfoSelectedList invoiceId={props.invoiceId} />
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
|
@ -1,22 +1,23 @@
|
||||
import {Table, TableProps, Tooltip} from "antd";
|
||||
import {Table, TableProps,
|
||||
Tooltip} from "antd";
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
import {useEffect, useState} from "react";
|
||||
import {get} from "../../../util/AjaxUtils.ts";
|
||||
import {IListPage} from "../../../interfaces/listpage/IListPage.ts";
|
||||
|
||||
type DetailDataType = {
|
||||
productType: string;
|
||||
quantity: number;
|
||||
unitPrice: number;
|
||||
notes: string;
|
||||
productDescription: string;
|
||||
}
|
||||
// type DetailDataType = {
|
||||
// productType: string;
|
||||
// quantity: number;
|
||||
// unitPrice: number;
|
||||
// notes: string;
|
||||
// productDescription: string;
|
||||
// }
|
||||
|
||||
type DataType = {
|
||||
orderId: string;
|
||||
orderNo: string;
|
||||
totalAmount: number;
|
||||
detail: DetailDataType;
|
||||
orderDetails: any;
|
||||
orderStatus: string;
|
||||
gmtCreate: string;
|
||||
}
|
||||
@ -71,60 +72,60 @@ export default function InvoiceInfoSelectedList(props: ListProps) {
|
||||
},
|
||||
{
|
||||
title: '产品类型',
|
||||
dataIndex: 'detail.productType',
|
||||
dataIndex: 'orderDetails.0.productType',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
render: (_value, record) => {
|
||||
if(record.detail.productType === 'PROJ') {
|
||||
if(record.orderDetails[0].productType === 'PROJ') {
|
||||
return '项目创建'
|
||||
}
|
||||
if(record.detail.productType === 'AGENT') {
|
||||
if(record.orderDetails[0].productType === 'AGENT') {
|
||||
return '项目代理'
|
||||
}
|
||||
return record.detail.productType
|
||||
return record.orderDetails[0].productType
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '数量',
|
||||
dataIndex: 'detail.quantity',
|
||||
dataIndex: 'orderDetails.0.quantity',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
render: (_value, record) => {
|
||||
return record.detail.quantity
|
||||
return record.orderDetails[0].quantity
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '单价',
|
||||
dataIndex: 'detail.unitPrice',
|
||||
dataIndex: 'orderDetails.0.unitPrice',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
render: (_value, record) => {
|
||||
return (record.detail.unitPrice / 100).toFixed(2)
|
||||
return (record.orderDetails[0].unitPrice / 100).toFixed(2)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '订单备注',
|
||||
dataIndex: 'detail.notes',
|
||||
dataIndex: 'orderDetails.0.notes',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
render: (_value, record) => {
|
||||
return record.detail.notes
|
||||
return record.orderDetails[0].notes
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
dataIndex: 'detail.productDescription',
|
||||
dataIndex: 'orderDetails.0.productDescription',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
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(() => {
|
||||
get<IListPage<DataType>>({
|
||||
messageApi,
|
||||
|
@ -254,7 +254,7 @@ export default function UserEdit(props: IUserEditProps) {
|
||||
<Input placeholder="请输入名称" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
{/* <Col span={12}>
|
||||
<Form.Item label="公司英文名"
|
||||
name="userInfoNameEn"
|
||||
rules={[
|
||||
@ -267,7 +267,7 @@ export default function UserEdit(props: IUserEditProps) {
|
||||
>
|
||||
<Input placeholder="请输入公司英文名" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Col> */}
|
||||
</Row>
|
||||
<Row gutter={15}>
|
||||
<Col span={12}>
|
||||
|
@ -20,6 +20,7 @@ export function reloadUser(messageApi: MessageInstance, globalDispatchContext: D
|
||||
messageApi,
|
||||
url: '/api/user-info/get-user-self',
|
||||
onSuccess({data}) {
|
||||
|
||||
globalDispatchContext({
|
||||
type: GlobalDataActionType.REFRESH_SELF,
|
||||
user: {
|
||||
@ -30,6 +31,15 @@ export function reloadUser(messageApi: MessageInstance, globalDispatchContext: D
|
||||
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);
|
||||
}
|
||||
})
|
||||
|
@ -108,6 +108,7 @@ import {
|
||||
// post,
|
||||
getUseUrl
|
||||
} from "../../util/AjaxUtils.ts";
|
||||
import { getLoginflag } from '../../request/api'
|
||||
import { GlobalContext, GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
|
||||
import UserEdit from "../../components/user/UserEdit.tsx";
|
||||
import PasswordChange from "../../components/password/PasswordChange.tsx";
|
||||
@ -844,12 +845,33 @@ export default function Head() {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
getUnRead()
|
||||
// 五分钟刷新一次用户信息
|
||||
setInterval(reloadUserInterval, 5 * 60 * 1000);
|
||||
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'] = [
|
||||
{
|
||||
@ -968,7 +990,8 @@ export default function Head() {
|
||||
),
|
||||
onClick: () => {
|
||||
reMenuActive()
|
||||
|
||||
// 清除缓存
|
||||
sessionStorage.clear()
|
||||
window.location.href = '/copyright/logout'
|
||||
}
|
||||
},
|
||||
@ -1066,31 +1089,31 @@ export default function Head() {
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent:'center',
|
||||
justifyContent: 'center',
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
onClick={() => {
|
||||
setPackageModal(true)
|
||||
setPackPage(1);
|
||||
getPickList(1, '')
|
||||
}}
|
||||
onClick={() => {
|
||||
setPackageModal(true)
|
||||
setPackPage(1);
|
||||
getPickList(1, '')
|
||||
}}
|
||||
>
|
||||
<img src={pack} width={19} height={19} alt="" />
|
||||
<div style={{
|
||||
fontSize:14,
|
||||
marginLeft:5
|
||||
fontSize: 14,
|
||||
marginLeft: 5
|
||||
}}>套餐包</div>
|
||||
</div>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
marginTop:5
|
||||
marginTop: 5
|
||||
}}>
|
||||
<div>
|
||||
<span style={{
|
||||
fontSize: 12,
|
||||
color: '#FF9F08',
|
||||
|
||||
|
||||
}}>全托管 </span>
|
||||
<span
|
||||
style={{
|
||||
@ -1099,31 +1122,31 @@ export default function Head() {
|
||||
fontWeight: 700,
|
||||
}}
|
||||
>{packNum.ALL}</span>
|
||||
<span style={{
|
||||
<span style={{
|
||||
fontSize: 12,
|
||||
color: '#FF9F08',
|
||||
|
||||
|
||||
}}> 件</span>
|
||||
</div>
|
||||
<div style={{
|
||||
marginLeft:15
|
||||
marginLeft: 15
|
||||
}}>
|
||||
<span style={{
|
||||
fontSize: 12,
|
||||
color: '#FF9F08',
|
||||
|
||||
|
||||
}}>写材料 </span>
|
||||
<span
|
||||
style={{
|
||||
fontSize: 16,
|
||||
color: '#FF9F08',
|
||||
fontWeight: 700,
|
||||
}}
|
||||
style={{
|
||||
fontSize: 16,
|
||||
color: '#FF9F08',
|
||||
fontWeight: 700,
|
||||
}}
|
||||
>{packNum.MATERIAL}</span>
|
||||
<span style={{
|
||||
fontSize: 12,
|
||||
color: '#FF9F08',
|
||||
|
||||
|
||||
}}> 件</span>
|
||||
</div>
|
||||
</div>
|
||||
|
4
src/request/api.ts
Normal file
4
src/request/api.ts
Normal 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
27
src/request/request.ts
Normal 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
|
@ -311,6 +311,10 @@ export default function ProjCreate() {
|
||||
id: ProjChargeType.FREE,
|
||||
price: freeInfo.price,
|
||||
handleClick: (_title, additional) => {
|
||||
if(freeCount <= 0){
|
||||
messageApi.warning('免费试用次数已用完')
|
||||
return
|
||||
}
|
||||
nav(`/proj-new/${ProjChargeType.FREE}?${additional.pkg ? 'pkg=true' : 'pkg='}&${additional.videoDemo ? 'videoDemo=true' : 'videoDemo='}`)
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ interface DataType {
|
||||
packageOrderId: string;
|
||||
}
|
||||
|
||||
import { useDispatch } from 'react-redux'
|
||||
import { useDispatch,useSelector } from 'react-redux'
|
||||
export default function ProjNew() {
|
||||
const dispath = useDispatch()
|
||||
// 更新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);
|
||||
// 创建一个 ref 来引用推荐列表容器
|
||||
const recommendListRef = useRef<HTMLDivElement>(null);
|
||||
@ -196,9 +200,11 @@ export default function ProjNew() {
|
||||
authorType: '',
|
||||
authorIdCardType: '',
|
||||
authorIdCard: '',
|
||||
authorCrcAccount: '',
|
||||
authorCrcAccount: 0,
|
||||
authorId: '',
|
||||
authorProvinceCity: ''
|
||||
authorProvinceCity: '',
|
||||
authorCrcAccountPassword: '',
|
||||
authorCrcAccountUsername: ''
|
||||
})
|
||||
const [concatPeopleInfo, setConcatPeopleInfo] = useState({
|
||||
applyConcatId: '',
|
||||
@ -380,6 +386,15 @@ export default function ProjNew() {
|
||||
// setPage(1)
|
||||
// }
|
||||
// },[projInfo.packageInfoId])
|
||||
useEffect(() => {
|
||||
if(packNum.ALL > 0 && pathParams.projChargeType == 'ALL'){
|
||||
setPackselectShow(true)
|
||||
}
|
||||
if(packNum.MATERIAL > 0 && pathParams.projChargeType == 'MATERIAL'){
|
||||
setPackselectShow(true)
|
||||
}
|
||||
}, [packNum]);
|
||||
|
||||
useEffect(() => {
|
||||
get({
|
||||
messageApi: messageApi,
|
||||
@ -638,7 +653,7 @@ export default function ProjNew() {
|
||||
|
||||
</Form.Item>
|
||||
<div style={{
|
||||
display:belongPeopleInfo.authorId? 'none' : 'unset',
|
||||
display: belongPeopleInfo.authorId ? 'none' : 'unset',
|
||||
position: 'absolute', right: 20,
|
||||
// fontSize: 16,
|
||||
color: " #1F79FF", cursor: 'pointer',
|
||||
@ -649,7 +664,7 @@ export default function ProjNew() {
|
||||
setBelongModal(true)
|
||||
}}>选择</div>
|
||||
<div style={{
|
||||
display:belongPeopleInfo.authorId? 'unset' : 'none',
|
||||
display: belongPeopleInfo.authorId ? 'unset' : 'none',
|
||||
|
||||
position: 'absolute', right: 0,
|
||||
// fontSize: 16,
|
||||
@ -665,9 +680,11 @@ export default function ProjNew() {
|
||||
authorType: '',
|
||||
authorIdCardType: '',
|
||||
authorIdCard: '',
|
||||
authorCrcAccount: '',
|
||||
authorCrcAccount: 0,
|
||||
authorId: '',
|
||||
authorProvinceCity: ''
|
||||
authorProvinceCity: '',
|
||||
authorCrcAccountUsername: '',
|
||||
authorCrcAccountPassword: '',
|
||||
})
|
||||
}}>取消</div>
|
||||
</div>
|
||||
@ -835,16 +852,30 @@ export default function ProjNew() {
|
||||
// background: '#eeeeee',
|
||||
// fontSize: 16,
|
||||
width: '310px', height: '42px', color: '#3B3B3B'
|
||||
}} placeholder={packList.length > 0 ? '请选择套餐包' : '暂无套餐包'}
|
||||
}}
|
||||
// placeholder={packList.length > 0 ? '请选择套餐包' : '暂无套餐包'}
|
||||
placeholder={packselectShow ? '请选择套餐包' : '暂无套餐包'}
|
||||
disabled
|
||||
/>
|
||||
|
||||
</Form.Item>
|
||||
<div style={{
|
||||
position: 'absolute',
|
||||
// left: 165,
|
||||
left: 158,
|
||||
|
||||
top: 40,
|
||||
// display: showTip ? 'unset' : 'none',
|
||||
color: 'red',
|
||||
fontSize: 18,
|
||||
fontWeight: 'bold',
|
||||
}}>注:已购买套餐包的请选择套餐包支付</div>
|
||||
<div
|
||||
style={{
|
||||
display: selectPack ? 'none' : 'unset', position: 'absolute', right: 23,
|
||||
// fontSize: 16,
|
||||
color: packList.length ? '#1F79FF' : '#676767', cursor: 'pointer',
|
||||
// color: packList.length ? '#1F79FF' : '#676767', cursor: 'pointer',
|
||||
color: packselectShow ? '#1F79FF' : '#676767', cursor: 'pointer',
|
||||
// background:'pink',
|
||||
width: 290,
|
||||
textAlign: 'right',
|
||||
@ -852,7 +883,7 @@ export default function ProjNew() {
|
||||
onClick={() => {
|
||||
if (packList.length > 0) {
|
||||
setPackModal(true)
|
||||
// setPage(1)
|
||||
setPage(1)
|
||||
setSelectedRowKeys([])
|
||||
getPickList(1)
|
||||
// #1F79FF
|
||||
@ -861,9 +892,13 @@ export default function ProjNew() {
|
||||
}
|
||||
|
||||
}}>选择</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('')
|
||||
setPackageOrderId('')
|
||||
setNowpackageOrderId('')
|
||||
setNowPackageName ('')
|
||||
|
||||
|
||||
form.setFieldsValue({
|
||||
packageName: ''
|
||||
})
|
||||
@ -1013,7 +1048,7 @@ export default function ProjNew() {
|
||||
// background:'pink',
|
||||
lineHeight: '40px'
|
||||
|
||||
}}>金额 :
|
||||
}}>金额 :
|
||||
<span
|
||||
style={{
|
||||
color: 'red',
|
||||
@ -1091,6 +1126,8 @@ export default function ProjNew() {
|
||||
// dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat),
|
||||
projDevCompleteDate: projInfo.projDevCompleteDate ? dayjs(projInfo.projDevCompleteDate).format(dateFormat) : '',
|
||||
authorCrcAccount: belongPeopleInfo.authorCrcAccount,
|
||||
authorCrcAccountPassword: belongPeopleInfo.authorCrcAccountPassword,
|
||||
authorCrcAccountUsername: belongPeopleInfo.authorCrcAccountUsername,
|
||||
authorId: belongPeopleInfo.authorId,
|
||||
authorIdCard: belongPeopleInfo.authorIdCard,
|
||||
authorIdCardType: belongPeopleInfo.authorIdCardType,
|
||||
@ -1104,7 +1141,6 @@ export default function ProjNew() {
|
||||
applyContactId: concatPeopleInfo.applyConcatId,
|
||||
applyContactName: concatPeopleInfo.applyContactName,
|
||||
applyContactPhone: concatPeopleInfo.applyContactPhone,
|
||||
|
||||
couponId: couponId ? couponId : '',
|
||||
// packageInfoId: packageInfoId ? packageInfoId : ''
|
||||
packageOrderId: packageOrderId ? packageOrderId : '',
|
||||
@ -1309,6 +1345,10 @@ export default function ProjNew() {
|
||||
}}
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
if (!nowPackageName) {
|
||||
messageApi.error('请选择套餐包')
|
||||
return
|
||||
}
|
||||
// setPickSelectNo(nowPickSelectNo)
|
||||
// setShowPrice(0)
|
||||
setSelectPack(true)
|
||||
@ -1427,9 +1467,25 @@ export default function ProjNew() {
|
||||
</div>
|
||||
</div>
|
||||
<div style={{
|
||||
textAlign: 'right',
|
||||
// textAlign: 'right',
|
||||
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"
|
||||
style={{
|
||||
width: 100,
|
||||
|
@ -142,34 +142,34 @@ export default function ProjEditStep2(props: any) {
|
||||
// setauthorCrcAccountUsername(selectedRows[0].crcAccountUsername)
|
||||
// setAuthorId(selectedRows[0].projOwnerId)
|
||||
// }
|
||||
// 判断是否是清空选中状态
|
||||
const isClearingSelection = selectedRowKeys.length === 0;
|
||||
if (isClearingSelection) {
|
||||
setauthorName('');
|
||||
setauthorIdCardType('');
|
||||
setauthorIdCard('');
|
||||
setauthorType('');
|
||||
setauthorNameEn('');
|
||||
setauthorProvinceCity('');
|
||||
setauthorCrcAccount(0);
|
||||
setauthorCrcAccountPassword('');
|
||||
setauthorCrcAccountUsername('');
|
||||
setAuthorId('');
|
||||
} else {
|
||||
// 正常选中时,更新相关状态
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
const firstSelectedRow = selectedRows[0];
|
||||
setauthorName(firstSelectedRow.name);
|
||||
setauthorIdCardType(firstSelectedRow.idCardType);
|
||||
setauthorIdCard(firstSelectedRow.idCardNo);
|
||||
setauthorType(firstSelectedRow.type);
|
||||
setauthorNameEn(firstSelectedRow.nameEn);
|
||||
setauthorProvinceCity(firstSelectedRow.provinceCity);
|
||||
setauthorCrcAccount(firstSelectedRow.isCrcAccount);
|
||||
setauthorCrcAccountPassword(firstSelectedRow.crcAccountPassword);
|
||||
setauthorCrcAccountUsername(firstSelectedRow.crcAccountUsername);
|
||||
setAuthorId(firstSelectedRow.projOwnerId);
|
||||
}
|
||||
// 判断是否是清空选中状态
|
||||
const isClearingSelection = selectedRowKeys.length === 0;
|
||||
if (isClearingSelection) {
|
||||
setauthorName('');
|
||||
setauthorIdCardType('');
|
||||
setauthorIdCard('');
|
||||
setauthorType('');
|
||||
setauthorNameEn('');
|
||||
setauthorProvinceCity('');
|
||||
setauthorCrcAccount(0);
|
||||
setauthorCrcAccountPassword('');
|
||||
setauthorCrcAccountUsername('');
|
||||
setAuthorId('');
|
||||
} else {
|
||||
// 正常选中时,更新相关状态
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
const firstSelectedRow = selectedRows[0];
|
||||
setauthorName(firstSelectedRow.name);
|
||||
setauthorIdCardType(firstSelectedRow.idCardType);
|
||||
setauthorIdCard(firstSelectedRow.idCardNo);
|
||||
setauthorType(firstSelectedRow.type);
|
||||
setauthorNameEn(firstSelectedRow.nameEn);
|
||||
setauthorProvinceCity(firstSelectedRow.provinceCity);
|
||||
setauthorCrcAccount(firstSelectedRow.isCrcAccount);
|
||||
setauthorCrcAccountPassword(firstSelectedRow.crcAccountPassword);
|
||||
setauthorCrcAccountUsername(firstSelectedRow.crcAccountUsername);
|
||||
setAuthorId(firstSelectedRow.projOwnerId);
|
||||
}
|
||||
|
||||
// setClom(String(selectedRowKeys))
|
||||
// setbelongselectedKeys(selectedRowKeys)
|
||||
@ -770,13 +770,13 @@ export default function ProjEditStep2(props: any) {
|
||||
/>
|
||||
</div> */}
|
||||
</div>
|
||||
<div className='showInfo' style={{alignItems:'center'}}>
|
||||
<div className='showInfo' style={{ alignItems: 'center' }}>
|
||||
<div style={{ marginRight: '22px' }}>当前所属者:</div>
|
||||
<div style={{ display: authorName == '' ? 'block' : 'none' }}>请选择所属者</div>
|
||||
<div style={{ display: authorName == '' ? 'none' : 'block' }}>
|
||||
{authorName}/{authorType == 'PERSONAL' ? '自然人' : '企业-组织'}/{authorIdCardType == 'ID_CARD' ? '身份证' : '营业执照'}/{authorIdCard}
|
||||
</div>
|
||||
<Button style={{ display: authorName == '' ? 'none' : 'block',height:30,marginLeft:10 }} onClick={()=>{
|
||||
<Button style={{ display: authorName == '' ? 'none' : 'block', height: 30, marginLeft: 10 }} onClick={() => {
|
||||
// lyp
|
||||
setauthorName('');
|
||||
setauthorIdCardType('');
|
||||
@ -1355,7 +1355,11 @@ export default function ProjEditStep2(props: any) {
|
||||
<Col span={12}>
|
||||
<div className='blongNameInt blongSmallNamel promptBox'>
|
||||
{/* <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>
|
||||
// label="姓名或公司名称"
|
||||
@ -1373,7 +1377,7 @@ export default function ProjEditStep2(props: any) {
|
||||
</div>
|
||||
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
{/* <Col span={12}>
|
||||
<div className='blongNameInt blongSmallNameR'>
|
||||
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '英文名' : '公司英文缩写'}</div>
|
||||
|
||||
@ -1397,6 +1401,29 @@ export default function ProjEditStep2(props: any) {
|
||||
</Form.Item>
|
||||
</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>
|
||||
|
||||
|
||||
@ -1423,11 +1450,12 @@ export default function ProjEditStep2(props: any) {
|
||||
/>
|
||||
|
||||
</Form.Item>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<Col span={12}>
|
||||
{/* <Col span={12}>
|
||||
<div className='blongNameInt blongSmallNamel'>
|
||||
<div className='blongTitle blongsmallTitle '>{belongShow == 'PERSONAL' ? '身份证号' : '统一社会信用代码'}</div>
|
||||
|
||||
@ -1444,7 +1472,7 @@ export default function ProjEditStep2(props: any) {
|
||||
</Form.Item>
|
||||
</div>
|
||||
|
||||
</Col>
|
||||
</Col> */}
|
||||
</Row></>}
|
||||
|
||||
<Row gutter={15}>
|
||||
@ -1654,6 +1682,7 @@ export default function ProjEditStep2(props: any) {
|
||||
<Modal
|
||||
destroyOnClose
|
||||
okText="确认"
|
||||
centered
|
||||
// cancelText="取消"
|
||||
cancelText={contactTitle === '查看联系人' ? '返回' : '取消'}
|
||||
open={isContantOpen}
|
||||
@ -1693,7 +1722,9 @@ export default function ProjEditStep2(props: any) {
|
||||
autoComplete="off"
|
||||
>
|
||||
<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>
|
||||
@ -1708,7 +1739,9 @@ export default function ProjEditStep2(props: any) {
|
||||
</Form.Item>
|
||||
</div>
|
||||
<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>
|
||||
name="phone"
|
||||
|
@ -21,6 +21,7 @@ type FieldType = {
|
||||
projDevCompleteDate: Dayjs;
|
||||
companyName: string;
|
||||
companyNameEn: string;
|
||||
projName: string;
|
||||
};
|
||||
// 所属人信息类型
|
||||
type BelongPeopleType = {
|
||||
@ -259,6 +260,7 @@ export default function ProjEditStep2() {
|
||||
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') : '',
|
||||
@ -519,17 +521,18 @@ export default function ProjEditStep2() {
|
||||
<div className='projNameInt'>
|
||||
|
||||
<div style={{ display: 'flex' }}>
|
||||
<div className='projTitle '> 项目简称:</div>
|
||||
<div className='projTitle '> 项目全称:</div>
|
||||
|
||||
<Form.Item<FieldType>
|
||||
// label="项目简称"
|
||||
name="projSubName"
|
||||
name="projName"
|
||||
rules={[{ required: false, message: '请输入项目简称' }]}
|
||||
>
|
||||
<Input
|
||||
style={{ height: '50px', width: '411px', fontSize: '16px' }}
|
||||
|
||||
placeholder="请输入项目简称" />
|
||||
// placeholder="请输入项目简称"
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
<div style={{ display: 'flex' }}>
|
||||
|
@ -39,7 +39,7 @@ import AgentSelect from "./agent/AgentSelect.tsx";
|
||||
import AgentAgreement from "./agent/AgentAgreement.tsx";
|
||||
import AgentCorrection from "./agent/AgentCorrection.tsx";
|
||||
import AgentResult from "./agent/AgentResult.tsx";
|
||||
|
||||
// import LoadingPage from './LoadingPage/LoadingPage.tsx'
|
||||
export const router = createHashRouter(
|
||||
// [
|
||||
// {
|
||||
@ -188,7 +188,11 @@ export const router = createHashRouter(
|
||||
// },
|
||||
// ]
|
||||
[
|
||||
|
||||
// {
|
||||
// path: '/loading',
|
||||
// element: <LoadingPage />,
|
||||
// },
|
||||
|
||||
{
|
||||
path: '/',
|
||||
element: <Index />,
|
||||
|
@ -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.103:7025/copyright';
|
||||
// export const WebSocketBaseUrl: string = '/copyright';
|
||||
|
||||
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 = 'c2438eb8-2685-49a9-bf02-5111a5192d96'; // 18647109157
|
||||
// export const DevUserId: string = '';
|
||||
// export const DevUserId = localStorage.getItem('userId')? localStorage.getItem('userId') : '';
|
||||
|
||||
type Req<T> = {
|
||||
messageApi: MessageInstance;
|
||||
@ -26,6 +28,7 @@ type Req<T> = {
|
||||
config?: AxiosRequestConfig;
|
||||
onBefore?(): void;
|
||||
onSuccess(data: AxiosResponse<T>): void;
|
||||
specialFlag?: string; // 添加特殊标识参数
|
||||
onFinally?(): void;
|
||||
// onError?: (error: any) => void; // 添加 onError 属性
|
||||
}
|
||||
@ -41,8 +44,18 @@ axios.interceptors.request.use(config => {
|
||||
if (config.method === 'get') {
|
||||
config.data = { unused: 0 } // 这个是关键点,解决get 请求添加不上content_type
|
||||
}
|
||||
config.headers['X-USER-ID'] = DevUserId;
|
||||
config.headers['X-SOURCE'] = 'page';
|
||||
const token = sessionStorage.getItem('token')? sessionStorage.getItem('token') : '';
|
||||
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
|
||||
});
|
||||
|
||||
@ -184,4 +197,9 @@ export function del<T>(req: Req<T>) {
|
||||
}).finally(() => {
|
||||
req.onFinally?.();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user