合同下载

This commit is contained in:
lyp 2024-11-29 17:52:17 +08:00
parent ea49a44c0f
commit 0dc89773a1
9 changed files with 915 additions and 191 deletions

View File

@ -0,0 +1,213 @@
import React, { useState } from 'react'
import { post,Axios,get } from "../../util/AjaxUtils.ts";
import useMessage from "antd/es/message/useMessage";
import {
Form,
Modal,
Input, Button
} from 'antd';
import ContractText from '../ContractText/ContractText'
import { useDispatch } from 'react-redux'
export default function ContractModal(props: any) {
const [messageApi, messageApiHolder] = useMessage();
const [modalOpen, setModalOpen] = useState(false)
const [form] = Form.useForm<any>();
const [name, setName] = useState(''); // 甲方姓名状态
const [phone, setPhone] = useState(''); // 电话状态
const [address, setAddress] = useState(''); // 地址状态
const onFinish = (values: any) => {
setName(values.name);
setPhone(values.phone);
setAddress(values.address);
setModalOpen(true)
}
const dispath = useDispatch()
const getContractArray = (page: any) => {
get({
messageApi,
url: `/api/contract/management/listpage/self`,
config: {
params: {
page: page,
rows: 10
}
},
onSuccess(data: any) {
console.log(data);
dispath({
type: 'upContractArray',
val: data.data.rows
})
dispath({
type: 'upContractTotal',
val: data.data.total
})
// setContractArray(data.data.rows)
}
})
}
const downContract = () => {
post<any>({
messageApi,
url: `/api/contract/management/save`,
body: {
firstPartyAddress: address,
firstPartyName: name,
firstPartyPhone: phone
},
onBefore() {
},
onSuccess(data) {
// console.log(data.data.data);
// console.log('成功');
const contractManagementId = data.data.data
window.open(`${Axios.defaults?.baseURL}/api/contract/management/download/${contractManagementId}`)
getContractArray(1)
setModalOpen(false)
props.closeModal()
},
onFinally() {
}
})
}
return (
<div>
{messageApiHolder}
<Form
name="Form"
form={form}
onFinish={onFinish}
initialValues={{ softWare: '' }}
style={{ maxWidth: 600, marginTop: 20 }}
>
<div className='refunModal-item'>
<div className='refunModal-title'>
<span className='refunModal-red'>*</span>
</div>
<div className='refunInput'>
<Form.Item
name="name"
rules={[{ required: true, message: '请输入甲方姓名!' }]}
>
<Input style={{
width: 405,
height: 46,
background: '#FFF',
color: 'black'
}}
placeholder="甲方姓名"
>
</Input>
</Form.Item>
</div>
</div>
<div className='refunModal-item'>
<div className='refunModal-title'>
<span className='refunModal-red'>*</span>
</div>
<div className='refunInput'>
<Form.Item
name="phone"
rules={[
{ required: true, message: '请输入联联系电话!' },
{
pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的手机号码',
},
]}
>
<Input
style={{
width: 405,
height: 46,
background: '#FFF',
color: 'black'
}}
placeholder="联系电话"
>
</Input>
</Form.Item>
</div>
</div>
<div className='refunModal-item'>
<div className='refunModal-title'>
<span className='refunModal-red'>*</span>
</div>
<div className='refunInput'>
<Form.Item
name="address"
rules={[{ required: true, message: '请输入联系地址!' }]}
>
<Input style={{
width: 405,
height: 46,
background: '#FFF',
color: 'black'
}}
placeholder="联系地址"
>
</Input>
</Form.Item>
</div>
</div>
<Form.Item>
<div className='refunModal-btn'>
<Button type="primary" htmlType="submit" style={{
width: 273,
height: 52
}}
>
</Button>
</div>
</Form.Item>
</Form>
<Modal
title="合同预览"
destroyOnClose={true}
open={modalOpen}
footer={null}
maskClosable={false} // 禁止通过点击蒙层关闭
onCancel={() => {
setModalOpen(false)
}}
okButtonProps={{ style: { background: 'red', color: 'white' } }}
width={850}
centered
>
<div className='contract'>
<ContractText name={name} phone={phone} address={address}></ContractText>
</div>
<div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: 20 }}>
<Button type="primary" onClick={
downContract
}></Button>
</div>
</Modal>
</div>
)
}

View File

@ -0,0 +1,67 @@
.contract {
font-size: 16px;
line-height: 30px;
word-break: break-all;
overflow-wrap: break-word;
white-space: normal;
box-sizing: border-box;
padding: 0;
margin: 0;
}
.contractTitle {
font-size: 25px;
}
/* 二级标题 */
.contractTitleTwo {
font-size: 20px;
margin-bottom: 10px;
}
/* 居中 */
.contractTextCenter {
text-align: center;
}
/* 加粗 */
.contractTextBold {
font-weight: 700;
}
/* 正文 */
.contractText {
text-indent: 2em;
}
.contractNum {
padding-right: 50px;
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
/* 不同模块间距 */
.contractBox {
margin-top: 30px;
}
/* 下划线 */
.contractLine {
text-decoration: underline;
}
.signBox{
display: flex;
}
.sign{
width: 100px;
height: 30px;
/* background-color: rgb(218, 218, 218); */
border-bottom: 1px solid black;
}

View File

@ -0,0 +1,192 @@
import React from 'react'
import './ContractText.css'
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='contractNum contractText'></div>
<div className='contractBox'>
<div><span className='contractLine'>{props.name}</span></div>
<div><span className='contractLine'>{props.address}</span></div>
<div><span className='contractLine'>{props.phone}</span></div>
</div>
<div className='contractBox'>
<div><span className='contractLine'>西AI秒著引擎平台</span></div>
<div><span className='contractLine'>西西909B6号楼9层0910室</span></div>
<div><span className='contractLine'>400-086-1633</span></div>
</div>
<div className='contractBox'>
<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秒著引擎平台上注册账户其注册的下单账号为15756244645。</div>
<div className='contractText'>1.2 AI秒著引擎平台提供相关服务AI秒著引擎平台具体下单选择的服务类型为准</div>
<table border={1} style={{ borderCollapse: 'collapse', width: '100%' ,marginTop:10}}>
<tbody>
<tr>
<td colSpan={2} style={{ textAlign: 'center',width: '50%',fontWeight:'700',background:'rgb(218, 218, 218)' }}></td>
<td colSpan={2} style={{ textAlign: 'center',width: '50%',fontWeight:'700',background:'rgb(218, 218, 218)' }}></td>
</tr>
<tr>
<td colSpan={2} style={{fontWeight:'700'}}></td>
<td colSpan={2} style={{fontWeight:'700'}}></td>
</tr>
<tr>
<td style={{ textAlign: 'center', width: '8%'}}>1</td>
<td ></td>
<td style={{ textAlign: 'center', width: '8%' }}>1</td>
<td ></td>
</tr>
<tr>
<td style={{ textAlign: 'center' }}>2</td>
<td></td>
<td style={{ textAlign: 'center' }}>2</td>
<td></td>
</tr>
<tr>
<td style={{ textAlign: 'center' }}>3</td>
<td></td>
<td style={{ textAlign: 'center' }}>3</td>
<td></td>
</tr>
<tr>
<td style={{ textAlign: 'center' }}>4</td>
<td></td>
<td style={{ textAlign: 'center' }}>4</td>
<td>退</td>
</tr>
<tr>
<td style={{ textAlign: 'center' }}>5</td>
<td></td>
<td style={{ textAlign: 'center' }}>5</td>
<td>退30%</td>
</tr>
<tr>
<td style={{ textAlign: 'center' }}>6</td>
<td></td>
<td style={{ textAlign: 'center' }}>6</td>
<td>退70%</td>
</tr>
<tr>
<td style={{ textAlign: 'center' }}>7</td>
<td>900</td>
<td style={{ textAlign: 'center' }}>7</td>
<td></td>
</tr>
<tr>
<td style={{ textAlign: 'center' }}>8</td>
<td></td>
<td style={{ textAlign: 'center' }}>8</td>
<td>300</td>
</tr>
<tr>
<td style={{ textAlign: 'center' }}>9</td>
<td ></td>
<td style={{ textAlign: 'center' }}>9</td>
<td ></td>
</tr>
</tbody>
</table>
</div>
<div className='contractBox'>
<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.3AI秒著引擎平台下单时显示价格为准</div>
</div>
<div className='contractBox'>
<div className='contractTitleTwo contractTextBold'></div>
<div></div>
<div className='contractText'>3.1 使使</div>
<div className='contractText'>3.2 </div>
<div className='contractText'>3.3 使</div>
<div className='contractText'>3.4 </div>
<div className='contractText'>3.5 </div>
<div></div>
<div className='contractText'>3.6 </div>
<div className='contractText'>3.7 </div>
<div className='contractText'>3.8 99线400-086-1633</div>
</div>
<div className='contractBox'>
<div className='contractTitleTwo contractTextBold'></div>
<div className='contractText'>4.1 </div>
<div className='contractText'>4.2 </div>
<div className='contractText'>4.2.1 广</div>
<div className='contractText'>4.2.2 </div>
<div className='contractText'>4.2.3 </div>
<div className='contractText'>4.2.4 </div>
<div className='contractText'>4.2.5 </div>
<div className='contractText'>4.3 </div>
</div>
<div className='contractBox'>
<div className='contractTitleTwo contractTextBold'></div>
<div className='contractText'>5.1 AI秒著引擎平台上注册账户所提供的相关信息均真实</div>
<div className='contractText'>5.2 </div>
<div className='contractText'>5.3 使AI秒著引擎平台搭建的可运行系统用于合法的目的和用途</div>
</div>
<div className='contractBox'>
<div className='contractTitleTwo contractTextBold'></div>
<div className='contractText'>6.1 退</div>
<div className='contractText'>6.2 </div>
<div className='contractText'>6.3 </div>
</div>
<div className='contractBox'>
<div className='contractTitleTwo contractTextBold'></div>
<div className='contractText'></div>
<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.5 </div>
</div>
<div className='contractBox'>
<div className='contractTitleTwo contractTextBold'></div>
<div className='contractText'></div>
</div>
<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.2 </div>
<div className='contractText'>9.32.1使</div>
<div className='contractText'>9.4 </div>
</div>
<div className='contractBox'>
<div className='contractTitleTwo contractTextBold contractTextCenter'></div>
<div className='contractBox'>
<div className='contractBox'>
<div className='contractText'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span className='contractLine'>{props.name}</span></div>
<div className='contractText signBox'>
<div></div>
<div className='sign'></div>
</div>
<div className='contractText'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div>
</div>
<div className='contractBox'>
<div className='contractText' >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span className='contractLine'>西</span></div>
<div className='contractText signBox'>
<div></div>
<div className='sign'></div>
</div>
<div className='contractText'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
</div>
</div>
</div>
</div>
)
}

View File

@ -72,6 +72,18 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
}
})
}
if (item.id == 'CONTRACT') {
// props.disableBelongpeople()
navugate('/contract', {
state: {
// keywords: props.correctionKeywords,
// correctionNumType:props.correctionNumType,
// correctionType:props.correctionType,
// applyStatus: props.correctionApplyStatus,
// authorId: props.authorId
}
})
}
}}>

View File

@ -0,0 +1,148 @@
import React, { useEffect, useState } from 'react'
import { // Table,
Pagination,
Table,
// message, Spin,
Empty,
} from 'antd';
import { get,Axios } from "../../util/AjaxUtils.ts";
import type { TableProps } from 'antd';
import useMessage from "antd/es/message/useMessage";
interface DataType {
contractManagementId: string;
firstPartyName: string;
firstPartyPhone: string;
firstPartyAddress: string;
gmtCreate: string;
}
import { useSelector, useDispatch } from 'react-redux'
export default function CONTRACT() {
const dispath = useDispatch()
const redxuState: any = useSelector(state => state)
const contractArray = redxuState.contractArray
const total = redxuState.contractTotal
const [messageApi, messageApiHolder] = useMessage();
const height = window.innerHeight - 180;
// const [contractArray, setContractArray] = useState<any[]>([])
// 分页
const [page, setPage] = useState(1)
const getContractArray = (page: any) => {
get({
messageApi,
url: `/api/contract/management/listpage/self`,
config: {
params: {
page: page,
rows: 10
}
},
onSuccess(data: any) {
console.log(data);
dispath({
type: 'upContractArray',
val: data.data.rows
})
dispath({
type: 'upContractTotal',
val: data.data.total
})
// setContractArray(data.data.rows)
}
})
}
// 表格
const columns: TableProps<DataType>['columns'] = [
{
title: '序号',
dataIndex: 'index',
key: 'index',
align: 'center',
width: 100,
render: (_text, _record, index) => (page - 1) * 10 + index + 1, // 显示序号从1开始
},
{
title: '甲方姓名',
dataIndex: 'firstPartyName',
key: 'firstPartyName',
align: 'center',
ellipsis: {
showTitle: true,
},
},
{
title: '联系电话',
dataIndex: 'firstPartyPhone',
key: 'firstPartyPhone',
align: 'center',
width: 320
},
{
title: '联系地址',
dataIndex: 'firstPartyAddress',
align: 'center',
key: 'firstPartyAddress',
ellipsis: {
showTitle: true,
},
},
{
title: '创建日期',
dataIndex: 'gmtCreate',
align: 'center',
key: 'gmtCreate',
width: 320
},
{
title: '操作',
dataIndex: 'contractManagementId',
align: 'center',
key: 'contractManagementId',
width: 200,
render: (text) => (
<div style={{
cursor: 'pointer',
color: '#007FFF',
}} onClick={() => {
window.open(`${Axios.defaults?.baseURL}/api/contract/management/download/${text}`)
}}></div>
)
},
]
useEffect(() => {
getContractArray(page)
}, [])
return (
<div>
{messageApiHolder}
<div style={{
height: height - 60,
background: 'white',
overflow: 'auto', marginTop: 18, marginBottom: -10
}}>
{/* 表格 */}
<div style={{ display: contractArray.length > 0 ? 'block' : 'none', padding: 10 }}>
<Table<DataType> columns={columns} dataSource={contractArray} pagination={false} rowKey="contractManagementId" />
</div>
<div style={{ display: contractArray.length <= 0 ? 'block' : 'none' }}>
<div style={{ height: height - 60, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Empty description="暂无数据" />
</div>
</div>
</div>
<div className='pagination' >
<Pagination defaultCurrent={page} total={total} pageSize={10} showSizeChanger={false} onChange={(page) => {
setPage(page)
getContractArray(page)
}} />
</div>
</div>
)
}

View File

@ -8,6 +8,7 @@ import { IMenuListItem, IMenuWithTopButton } from "../../interfaces/menu/IMenuWi
import MenuWithTopButton from "../../components/menu/MenuWithTopButton.tsx";
import RefunModal from '../../components/RefunModal/RefunModal.tsx'
import CorrectionModal from '../../components/CorrectionModal/CorrectionModal.tsx'
import ContractModal from '../../components/ContractModal/ContractModal.tsx'
// import MenuWithBottomButtom from '../../components/menu/MenuWithBottomButton.tsx'
// import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
// import ListProj from "../../components/list/ListProj.tsx";
@ -288,6 +289,7 @@ export default function Index() {
{ id: 'REFUN', name: '退款项目' },
// correction
{ id: 'CORRECTION', name: '补正项目' },
{ id: 'CONTRACT', name: '合同下载' },
],
handleListItem(_e, _index, item: IMenuListItem) {
@ -379,6 +381,9 @@ export default function Index() {
})
},
})
// 新增合同弹窗
const [contractModal, setContractModal] = useState(false)
// const [agentMenu, setAgentMenu] = useState<IMenuWithTopButton>({
// button: {
// name: '代理服务',
@ -514,6 +519,8 @@ export default function Index() {
const [showSearchBox, setShowSearchBox] = useState(true)
const [refunSearchBox, setRrefunSearchBox] = useState(false)
const [correctionSearchBox, setCorrectionSearchBox] = useState(false)
// 新增合同按钮是否显示
const [contractSearchBox, setContractSearchBox] = useState(false)
// 优惠券遮罩层是否i西安市
const [coupon, setCoupon] = useState(false)
// 获取优惠券弹出层是否显示
@ -645,11 +652,13 @@ export default function Index() {
setShowSearchBox(true)
// setClickBelongpeople(true)
setRrefunSearchBox(false)
setContractSearchBox(false)
setCorrectionSearchBox(false)
} else if (location.pathname.includes('/proj-create')) {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setNow('创建项目')
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '创建项目' }])
// /config-mod-list /config-menu-list /config-mod-show
@ -658,6 +667,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setEditname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '编辑项目' }])
} else if (location.pathname.includes('/proj-new')) {
@ -665,6 +675,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: '新建项目' }])
} else if (location.pathname.includes('/proj-efree')) {
@ -672,6 +683,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '编辑项目' }])
} else if (location.pathname.includes('/proj-eall')) {
@ -679,6 +691,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页 </Link> }, { title: '编辑项目' }])
} else if (location.pathname.includes('/proj-edit/step1')) {
@ -686,6 +699,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '标题简介' }])
} else if (location.pathname.includes('/proj-edit/step2')) {
@ -693,6 +707,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '基本信息' }])
} else if (location.pathname.includes('/proj-edit/config-loginpage')) {
@ -700,6 +715,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '登录界面设置' }])
} else if (location.pathname.includes('/proj-edit/config-mod-list')) {
@ -707,6 +723,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '系统菜单管理' }])
} else if (location.pathname.includes('/proj-edit/config-menu-list')) {
@ -714,6 +731,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '系统菜单顺序' }])
} else if (location.pathname.includes('/step3')) {
@ -721,6 +739,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '软件功能特点' }])
} else if (location.pathname.includes('/proj-edit/config-mod-save')) {
@ -728,12 +747,14 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '添加菜单' }])
} else if (location.pathname.includes('/proj-edit/config-mod-edit')) {
setNow('编辑菜单')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-2) }}>编辑项目</a> }, { title: <a onClick={() => { nav(-1) }}>系统菜单管理</a> }, { title: '编辑菜单' }])
// /config-mod-edit /config-mod-show
} else if (location.pathname.includes('/proj-edit/config-mod-show')) {
@ -741,6 +762,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-2) }}>编辑项目</a> }, { title: <a onClick={() => { nav(-1) }}>系统菜单管理</a> }, { title: '查看菜单' }])
// /config-mod-edit
} else if (location.pathname.includes('/product-release')) {
@ -748,6 +770,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setPathArray([{ title: '首页' }])
// /config-mod-edit /product-release /transaction-order
} else if (location.pathname.includes(' /transaction-order')) {
@ -755,6 +778,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setPathArray([{ title: '首页' }])
// /config-mod-edit /product-release /transaction-order
} else if (location.pathname.includes(' /copyright-goods')) {
@ -762,6 +786,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setPathArray([{ title: '首页' }])
// /config-mod-edit /product-release /transaction-order
} else if (location.pathname.includes(' /trading-goods')) {
@ -769,6 +794,7 @@ export default function Index() {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setPathArray([{ title: '首页' }])
// /config-mod-edit /product-release /transaction-order
} else if (location.pathname.includes('/refun')) {
@ -777,6 +803,7 @@ export default function Index() {
// setClickBelongpeople(false)
setRrefunSearchBox(true)
setCorrectionSearchBox(false)
setContractSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '软件功能特点' }])
} else if (location.pathname.includes('/correction')) {
@ -785,8 +812,15 @@ export default function Index() {
// setClickBelongpeople(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(true)
setContractSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '软件功能特点' }])
} else if (location.pathname.includes('/contract')) {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(true)
setNow('首页-合同下载')
}
}, [location.pathname])
useEffect(() => {
@ -1547,11 +1581,29 @@ export default function Index() {
</Button>
</div>
</div>
<div style={{ display: contractSearchBox ? 'block' : 'none' }}>
<div className='mediaSearch' style={{
display: 'flex',
alignItems: 'center'
}}>
<div className='mediaLine'>
<div className='line' style={{
}} ></div>
</div>
<Button type="primary" onClick={() => {
setContractModal(true)
}}
style={{ background: '#FF9F08' }}
>
</Button>
</div>
</div>
<div style={{
width: '253px',
height: '31px',
display: showSearchBox || refunSearchBox || correctionSearchBox ? 'none' : 'block'
display: showSearchBox || refunSearchBox || correctionSearchBox || contractSearchBox ? 'none' : 'block'
}}></div>
<div className='nowPosition'>
<img src={backImg} alt="" />
@ -1643,6 +1695,9 @@ export default function Index() {
<span style={{ marginLeft: 10, marginRight: 10 }}>|</span>
<span></span>
</div>
<div style={{ display: now == '首页-合同下载' ? 'block' : 'none' }}>
<span></span>
</div>
</div>
</div>
</div>
@ -1669,6 +1724,8 @@ export default function Index() {
okButtonProps={{ style: { background: 'red', color: 'white' } }}
width={592}
maskClosable={false} // 禁止通过点击蒙层关闭
centered
>
<RefunModal closeModal={() => { setRefunModal(false) }}></RefunModal>
</Modal>
@ -1683,10 +1740,27 @@ export default function Index() {
}}
okButtonProps={{ style: { background: 'red', color: 'white' } }}
width={592}
centered
>
<CorrectionModal closeModal={() => { setCorrectionModal(false) }}
></CorrectionModal>
</Modal>
<Modal
title="新增合同"
destroyOnClose={true}
open={contractModal}
footer={null}
maskClosable={false} // 禁止通过点击蒙层关闭
onCancel={() => {
setContractModal(false)
}}
okButtonProps={{ style: { background: 'red', color: 'white' } }}
width={592}
centered
>
<ContractModal closeModal={() => { setContractModal(false) }}></ContractModal>
</Modal>
<Modal title="优惠券"
footer={null}

View File

@ -6,6 +6,7 @@ import CopyrightGgoods from '../route/CopyrightGgoods/CopyrightGgoods.tsx'
import TradingGoods from '../route/TradingGoods/TradingGoods.tsx'
import Refun from '../route/Refun/Refun.tsx'
import Correction from '../route/Correction/Correction.tsx'
import Contract from '../route/Contract/Contract.tsx';
import Index from "../route/index/Index.tsx";
// import Search from "../route/SearchList/SearchList.tsx";
import ProjCreate from "./proj/ProjCreate.tsx";
@ -186,7 +187,9 @@ export const router = createHashRouter(
// element: <AgentResult />
// },
// ]
[{
[
{
path: '/',
element: <Index />,
children: [
@ -231,6 +234,10 @@ export const router = createHashRouter(
path: '/correction',
element: <Correction />
},
{
path: '/contract',
element: <Contract />
},
{
path: '/proj-create',
element: <ProjCreate />

View File

@ -11,6 +11,8 @@ const baseState = {
belongArray: [],
refunArray:[],
correctionArray:[],
contractArray:[],
contractTotal:0,
refunTotal:0,
correctionTotal:0,
couponModal:false,
@ -44,6 +46,12 @@ const reducer = (state = baseState, action: any) => {
if (action.type == 'upCorrectionArray') {
nstate.correctionArray = action.val
}
if (action.type == 'upContractArray') {
nstate.contractArray = action.val
}
if (action.type == 'upContractTotal') {
nstate.contractTotal = action.val
}
if (action.type == 'upCorrectionTotal') {
nstate.correctionTotal = action.val
}

View File

@ -58,6 +58,9 @@ export function websocketUrl() {
export function downloadUrl(fileId: string, isDownload?: boolean) {
return `${Axios.defaults?.baseURL}/route/file/v2/download/${isDownload == false}/${fileId}`
}
export function downContract(fileId: any) {
return `${Axios.defaults?.baseURL}/api/contract/management/download/${fileId}`
}
export function uploadImageUrl() {
return `${Axios.defaults?.baseURL}/api/file/v2/upload-image`;