换名暂存

This commit is contained in:
lyp 2025-05-30 14:34:21 +08:00
parent 06e26bc366
commit 8d6fded571
7 changed files with 1412 additions and 11 deletions

View File

@ -3,10 +3,23 @@ VITE_BASE_URL=http://${VITE_HOST}
VITE_COPY_BASE_URL=${VITE_BASE_URL}:7025
VITE_OPERATOR_BASE_URL=${VITE_BASE_URL}:8091
VITE_OPERATOR_PLUGIN_BASE_URL=${VITE_BASE_URL}:8099
VITE_AI_SHOP_BASE_URL=http://192.168.0.115:8081
VITE_AI_SHOP_BASE_URL=http://192.168.0.15:8081
VITE_WEBSOCKET_BASE_URL=ws://${VITE_HOST}:7025/copyright
# 18634604067
VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671
# VITE_USERID=e3e40f95-7a3f-4b53-a1a0-51dd4e881d74
# VITE_CURRENT_THEME=fzkj
VITE_CURRENT_THEME=mzw
# VITE_HOST=121.36.71.250:58038
# VITE_BASE_URL=http://${VITE_HOST}
# VITE_COPY_BASE_URL=${VITE_BASE_URL}
# VITE_OPERATOR_BASE_URL=${VITE_BASE_URL}
# VITE_OPERATOR_PLUGIN_BASE_URL=${VITE_BASE_URL}
# VITE_AI_SHOP_BASE_URL=${VITE_BASE_URL}
# # VITE_WEBSOCKET_BASE_URL=ws://${VITE_HOST}:7025/copyright
# VITE_WEBSOCKET_BASE_URL=ws://${VITE_HOST}/copyright
# # 18634604067
# VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671  
# # VITE_USERID=e3e40f95-7a3f-4b53-a1a0-51dd4e881d74  
# # VITE_CURRENT_THEME=fzkj
# VITE_CURRENT_THEME=mzw

View File

@ -0,0 +1,464 @@
// import React from 'react'
import { useEffect, useState } from 'react'
// import './RefunModal.css'
import {
Form,
// Select,
Button, Upload, message, Input, Modal, Table, Empty
} from 'antd';
import type { TableColumnsType } from 'antd';
const { Search } = Input;
import { UploadOutlined } from '@ant-design/icons';
import {
// DevUserId
get, post, uploadFileUrl
} from "../../util/AjaxUtils.ts";
// import { getMenuActive } from '../../util/cache.ts'
import { useDispatch } from 'react-redux'
const { TextArea } = Input;
interface DataType {
// key: React.Key;
projName: string;
projContext: string;
gmtCreate: string;
projId: string
}
export default function ReplaceModal(props: any) {
const token = sessionStorage.getItem('token')
const columns: TableColumnsType<DataType> = [
{
title: '序号',
dataIndex: 'index',
align: 'center',
width: 80,
render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号从1开始
},
{
title: '项目名称',
dataIndex: 'projName',
align: 'center',
render: (text: string) => <>{text}</>,
},
// {
// title: '已通过补正次数',
// dataIndex: 'approvedCount',
// align: 'center',
// width: 130,
// render: (text) => <>{text}</>, // 显示序号从1开始
// },
{
title: '所属者名称',
dataIndex: 'applyContactName',
align: 'center',
render: (text: string) => <>{text}</>,
},
{
title: '编号',
dataIndex: 'projContext',
align: 'center',
},
{
title: '创建时间',
dataIndex: 'gmtCreate',
align: 'center',
},
];
const [messageApi, contextHolder] = message.useMessage();
// 选择项目得临时name
const [newprojName, setnewprojName] = useState('')
// 选择项目得name
const [projName, setProjName] = useState('')
// 选择得项目临时id
const [newprojId, setnewProjId] = useState('')
// 选择 项目的id
const [projId, setProjId] = useState('')
//默认选择得项目
const [selectedRowKeys, setselectedRowKeys] = useState<string[]>([])
// 分页
const [page, setPage] = useState(1)
const [total, setTotal] = useState(0)
// 搜索关键字
const [keywords, setKeywords] = useState('')
// 选择项目弹窗
const [projModal, setProjModal] = useState(false)
// 上传附件
const [correctionArray, setCorrectionArray] = useState<string[]>([]);
// const [selectedReason, setSelectedReason] = useState(''); //选择原因
// const handleReasonChange = (value: any) => {
// setSelectedReason(value);
// };
// 获取当前选择类型
// const type = getMenuActive() == 'Correction-PENDING' ? 'PENDING' : getMenuActive() == 'Correction-APPROVED' ? 'APPROVED' : getMenuActive() == 'Correction-REJECTED' ? 'REJECTED' : getMenuActive() == 'Correction-CANCELED' ? 'CANCELED' : ''
const dispath = useDispatch()
const [correctionDataArray, setCorrectionDataArray] = useState<any[]>([]) //未补正项目
const [isDisabled, setIsDisabled] = useState(false) //提交按钮是否禁用
const [form] = Form.useForm<any>();
// 关键字搜索
const handleSearch = (value: string) => {
setKeywords(value)
}
const handleChange = (e: any) => {
if (e.target.value == '') {
setKeywords('')
}
}
// 提交表单
const onFinish = (values: any) => {
dispath({
type: 'newReplace',
val: true
})
// console.log('Form values:', values);
// console.log(refunArray);
// console.log(values);
post<any>({
messageApi,
url: `/api/proj/rename/apply/save`,
body: {
projId: projId,
renameReason: values.other,
renameVoucher: correctionArray.join(','),
// correctionType: values.correctionType
},
onBefore() {
setIsDisabled(true)
},
onSuccess() {
messageApi.success('提交成功')
setIsDisabled(true)
setTimeout(() => {
props.closeModal()
}, 500)
getData()
},
onFinally() {
setIsDisabled(false)
}
})
};
const getData = () => {
get({
messageApi,
url: `/api/proj/rename/apply/listpage/self`,
config: {
params: {
page: 1,
rows: 20,
applyStatus: ''
}
},
onSuccess(data: any) {
// console.log('更新');
// dispath({
// type: 'upCorrectionArray',
// val: data.data.rows
// })
// dispath({
// type: 'upCorrectionTotal',
// val: data.data.total
// })
dispath({
type: 'upReplaceArray',
val: data.data.rows
})
dispath({
type: 'upReplaceTotal',
val: data.data.total
})
}
})
}
// 获取未补正项目
const getCorrectionData = () => {
get({
messageApi,
url: `/api/proj/rename/apply/listpage-proj-unapply/self`,
config: {
params: {
page: page,
rows: 20,
keywords
}
},
onBefore() {
},
onSuccess(data: any) {
// console.log(data.data.rows);
// const newArray = (data.data).map((item: { projId: any; projName: any; }) => ({
// value: item.projId,
// label: item.projName
// }))
setCorrectionDataArray(data.data.rows)
setTotal(data.data.total)
},
onFinally() {
},
})
}
useEffect(() => {
getCorrectionData()
}, [page, keywords])
return (
<div className='refunModal'>
{contextHolder}
<Form
name="Form"
form={form}
onFinish={onFinish}
initialValues={{ softWare: '' }}
style={{ maxWidth: 600 }}
>
<div className='refunModal-item'>
<div className='refunModal-title'>
<span className='refunModal-red'>*</span>
</div>
<div className='refunInput'>
<Form.Item
name="title"
rules={[{ required: true, message: '请选择一个软著!' }]}
>
<Input style={{
width: 405,
height: 46,
background: '#FFF',
color: 'black'
}}
placeholder="选择需要换名的软著"
disabled
>
</Input>
</Form.Item>
<div className='refunInput-button' onClick={() => {
setProjModal(true)
setKeywords('')
setPage(1)
getCorrectionData()
}}>
</div>
</div>
</div>
<div className='refunModal-item'>
<div className='refunModal-title'>
<span className='refunModal-red'>*</span>
</div>
<Form.Item
name="other"
rules={[{ required: true, message: '请输入换名原因' }]}
>
<TextArea
placeholder="输入换名原因"
style={{ height: 120, resize: 'none', width: 405 }}
/>
</Form.Item>
</div>
{/* <div className='refunModal-item' >
<div className='refunModal-title'>
<span className='refunModal-red'>*</span>
</div>
<Form.Item
name="other"
// label="退款软著"
rules={[{ required: true, message: '请输入退款原因' }]}
>
<TextArea
// showCount
// maxLength={100}
placeholder="其他退款原因"
style={{ height: 120, resize: 'none', width: 405, }}
/>
</Form.Item>
</div> */}
<div className='refunModal-item'>
<div className='refunModal-title'>
<span className='refunModal-red'>*</span>
</div>
<div style={{ width: 405, }}>
<Form.Item
name="img"
// label="退款软著"
valuePropName="fileList"
getValueFromEvent={(e: any) => {
if (e.file.status === 'done') {
correctionArray.push(e.file.response.data.fileId);
setCorrectionArray(correctionArray);
}
if (e.file.status === 'removed') {
const idArray = correctionArray.filter(item => item != e.file.response.data.fileId);
setCorrectionArray(idArray);
}
return e.fileList;
}}
rules={[{ required: true, message: '请上传补正通知书' }]}
>
<Upload
name="file"
action={uploadFileUrl()}
// headers={{ 'X-USER-ID': DevUserId }}
headers={{ 'Auth': `Bearer ${token}` }}
beforeUpload={(file) => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'application/pdf';
// const isPdf = file.type === 'application/pdf';
if (!isJpgOrPng) {
message.error('只能上传 JPG/PNG/PDF 格式文件!');
return Upload.LIST_IGNORE; // 不允许上传非
}
return isJpgOrPng;
}}
// listType="picture-card"
>
<Button icon={<UploadOutlined />} style={{ marginTop: 2 }}></Button>
</Upload>
</Form.Item>
</div>
</div>
<div
style={{
color: '#FF0000',
marginLeft: 10
}}
>*</div>
<Form.Item>
<div className='refunModal-btn'>
<Button type="primary" htmlType="submit" style={{
width: 273,
height: 52
}}
disabled={isDisabled}
>
</Button>
</div>
</Form.Item>
</Form>
<Modal title="选择换名项目"
destroyOnClose
okText="确认"
cancelText="取消"
open={projModal}
onOk={
() => {
if (newprojId) {
setProjName(newprojName)
setProjId(newprojId)
setProjModal(false)
setselectedRowKeys([newprojId])
form.setFieldsValue({
title: newprojName
});
} else {
messageApi.open({
type: 'error',
content: '请选择要补正项目'
})
}
}
}
width={1220}
onCancel={() => {
setselectedRowKeys([projId])
setnewProjId(projId)
setnewprojName(projName)
setProjModal(false)
}}>
<Search placeholder="输入项目名称"
onSearch={handleSearch}
onChange={handleChange}
style={{
width: '200px',
height: '31px',
marginBottom: 15
}}
allowClear
/>
<Table
rowSelection={{
selectedRowKeys: selectedRowKeys,
type: 'radio',
// ...rowSelection,
onChange: (_selectedRowKeys: React.Key[], selectedRows: DataType[]) => {
// console.log('selectedRows: ', selectedRows);
setselectedRowKeys([selectedRows[0].projId])
setnewProjId(selectedRows[0].projId)
setnewprojName(selectedRows[0].projName)
},
}}
columns={columns}
dataSource={correctionDataArray}
rowKey={'projId'}
pagination={
{
pageSize: 20,
total: total,
onChange: (currentPage) => {
setPage(currentPage);
},
showSizeChanger: false,
current: page
}
}
locale={{
emptyText: <Empty
description="暂无数据"
/>,
}}
scroll={{ y: 500 }}
onRow={(record: DataType) => {
return {
onClick: (event: React.MouseEvent<HTMLTableRowElement>) => {
// 阻止默认的行点击事件,以避免选中行时触发其他操作
event.stopPropagation();
// 更新选中的行
setselectedRowKeys([record.projId]);
setnewProjId(record.projId);
setnewprojName(record.projName);
},
};
}}
/>
</Modal>
</div>
)
}

View File

@ -91,6 +91,12 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
}
})
}
if (item.id == 'REPLACENAME') {
// props.disableBelongpeople()
navugate('/replace', {
})
}
}}>

View File

@ -0,0 +1,645 @@
// import './Correction.css';
import { useState, useEffect, } from 'react';
import {
// Table,
Pagination,
Modal,
// Tag,
message, Spin,
Empty,
Dropdown,
// Button
} from 'antd';
// import {
// // MenuFoldOutlined,
// ClearOutlined
// } from '@ant-design/icons';
import { useSelector, useDispatch } from 'react-redux'
import {
get,
put,
downloadUrl,
// Axios,
// post
} from '../../util/AjaxUtils'
// import type { TableProps } from 'antd';
import { useLocation } from 'react-router-dom';
// import { getMenuActive } from '../../util/cache'
// import { useNavigate } from "react-router-dom";
// interface DataType {
// projName: string;
// type: string; //类型
// correctionType: string; //补正种类
// correctionReason: string;
// gmtCreate: string; //补正时间
// gmtReview: string;//审核时间
// reviewReason: string;//审核意见
// projId: string;
// applyStatus: string;//审核状态
// correctionVoucherFileKVs: any //补正凭证
// projCorrectionApplyId: string
// authorName: string;
// }
import revokeImg from '../../static/revoke.png'
// import { useLocation } from 'react-router-dom'
import logoImg from '../../static/projBox/logo.png'
import reason from '../../static/projBox/reson.png'
import green from '../../static/projBox/green.png'
import red from '../../static/projBox/red.png'
import blue from '../../static/projBox/blue.png'
import black from '../../static/projBox/black.png'
import numbg from '@theme/img/projBox/num.png'
import titleBg from '@theme/img/projBox/background.png'
import timeImg from '@theme/img/projBox/timeback.png'
import { useNavigate } from "react-router-dom";
export default function Replcae() {
// 标签变量
const nav = useNavigate();
const height = window.innerHeight - 180;
const [messageApi, contextHolder] = message.useMessage();
const { state } = useLocation()
const [isLoading, setIsLoading] = useState(false)
const [revokeModal, setRevokeModal] = useState(false) //撤销弹窗
const keyWords = state ? state.keywords : ''
const applyStatus = state ? state.applyStatus : ''
const tagCor = state ? state.tagCor : ''
const authorId = state ? state.authorId : ''
const correctionNumType = state ? state.correctionNumType : ''
const correctionType = state ? state.correctionType : ''
const [page, setPage] = useState(1) // 分页
const dispath = useDispatch()
const redxuState: any = useSelector(state => state)
const replaceArray = redxuState.replaceArray
// const [tagIdArray,setTagIdArray] = useState([])
const total = redxuState.replaceTotal
const newReplace = redxuState.newReplace
const [projRenameApplyId, setprojRenameApplyId] = useState('') //要撤销的id
// const [tagCorArray, setTagCorArray] = useState([])
// 获取补正标签
// const getCorTag = () => {
// get({
// messageApi,
// url: `/api/proj/correction/apply/tag/list-tag`,
// onBefore() {
// },
// onSuccess(data: any) {
// // console.log('标签信息', data);
// const newarrty: any = (data.data).map((item: any) => ({
// value: item.key,
// label: item.value
// }));
// // console.log('标签信息', newarrty);
// setTagCorArray(newarrty)
// },
// onFinally() {
// }
// })
// }
const getData = (page: number) => {
const [part1, part2] = tagCor ? tagCor.split(':') : ['', ''];
get({
messageApi,
url: `/api/proj/rename/apply/listpage/self`,
// url: `/api/proj/refund/apply/listpage?applyStatus=${state.type}`,
config: {
params: {
page: page,
rows: 20,
projName: keyWords,
applyStatus: applyStatus,
// type: correctionNumType,
// correctionType: correctionType,
authorId: authorId,
tagDataId: part1,
tagNot: part2 == 'TAG_NOT' ? true : '',
}
},
onBefore() {
setIsLoading(true)
},
onSuccess(data: any) {
// console.log('呵呵', data.data.rows);
// setData(data.data.rows)
// console.log(data.data.rows);
dispath({
type: 'upReplaceArray',
val: data.data.rows
})
dispath({
type: 'upReplaceTotal',
val: data.data.total
})
// setTotal(data.data.total)
},
onFinally() {
setIsLoading(false)
},
})
}
// // 更新标签状态
// const upTag = (dataId: string, projCorrectionApplyId: string, projId: string) => {
// post<any>({
// messageApi,
// url: `/api/proj/correction/apply/tag/save-or-delete`,
// body: {
// dataId,
// projCorrectionApplyId,
// projId
// },
// onBefore() {
// },
// onSuccess(data) {
// // console.log(data.data.data);
// // props.upData
// // props.updata()
// // setTagStatus(data.data.data)
// // 根据返回的状态更新 tagIdArray
// if (data.data.data === 'SAVE') {
// // setTagIdArray((prevArray: any) => [...prevArray, dataId]);
// } else if (data.data.data === 'DELETE') {
// // setTagIdArray((prevArray: any[]) => prevArray.filter(id => id !== dataId));
// }
// },
// onFinally() {
// }
// })
// }
// 撤销补正
const projRefund = () => {
put<any>({
messageApi,
url: `/api/proj/rename/apply/cancel/self/${projRenameApplyId}`,
onBefore() {
},
onSuccess() {
setRevokeModal(false)
messageApi.success('已撤销');
get({
messageApi,
url: `/api/proj/rename/apply/listpage/self`,
// url: `/api/proj/refund/apply/listpage?applyStatus=${state.type}`,
config: {
params: {
page: page,
rows: 20,
projName: keyWords,
applyStatus: applyStatus,
// type: correctionNumType,
// correctionType: correctionType,
authorId: authorId
}
},
onSuccess(data: any) {
// console.log(data.data.rows);
// setData(data.data.rows)
// setTotal(data.data.total)
if (data.data.rows.length == 0 && page > 1) {
getData(page - 1)
} else {
dispath({
type: 'upReplaceArray',
val: data.data.rows
})
dispath({
type: 'upReplaceTotal',
val: data.data.total
})
}
}
})
},
onFinally() {
// setIsProjIntroductionLoading(false)
// renderData()
}
})
}
useEffect(() => {
// getData(1)
getData(1)
setPage(1)
// console.log(tagCor);
// console.log('嘻嘻',correctionArray);
}, [keyWords, applyStatus, authorId, correctionNumType, correctionType, tagCor])
useEffect(() => {
// 获取id为refun的元素
const refun: any = document.getElementById('refun');
// 当更换页码时候滚动到最上面
refun.scrollTop = 0;
}, [replaceArray])
useEffect(() => {
// getData(1)
if (newReplace) {
setPage(1)
getData(1)
dispath({
type: 'newCorrection',
val: false
})
}
}, [newReplace])
useEffect(() => {
// getCorTag()
// dispath({
// type: 'upCorrectionArray',
// val: updatedArray
// });
// getData(1)
}, [])
return (
<div>
{contextHolder}
<div className='refun' id='refun' style={{ height: `${height - 60}px`, overflow: 'auto' }}>
<Spin tip="加载中..." spinning={isLoading}>
{replaceArray.length == 0 ?
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', width: '100%', height: `${height - 60}px` }}>
<Empty description="暂无数据" />
</div>
: <>
{replaceArray.map((item: any, index: any) => {
// const downCode = [
// {
// key: 'downword',
// label: (
// <div
// style={{ width: 100, display: 'flex', justifyContent: 'center', alignItems: 'center' }}
// onClick={() => {
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/correction/${item.projId}`)
// }}
// >
// Word
// </div>
// ),
// },
// {
// key: 'downpdf',
// label: (
// <div
// style={{ width: 100, display: 'flex', justifyContent: 'center', alignItems: 'center' }}
// onClick={() => {
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/correction/pdf/${item.projId}`)
// }}
// >
// PDF
// </div>
// ),
// },
// ]
// const downManual = [
// {
// key: 'downword',
// label: (
// <div
// style={{ width: 100, display: 'flex', justifyContent: 'center', alignItems: 'center' }}
// onClick={() => {
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/correction/${item.projId}`)
// }}
// >
// Word
// </div>
// ),
// },
// {
// key: 'downpdf',
// label: (
// <div
// style={{ width: 100, display: 'flex', justifyContent: 'center', alignItems: 'center' }}
// onClick={() => {
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/correction/pdf/${item.projId}`)
// }}
// >
// PDF
// </div>
// ),
// },
// ]
const voucherItems = item.renameVoucherFileKVs.map((item: any) => ({
key: item.key,
label: (
<div
onClick={() => {
window.open(downloadUrl(item.key, false), '_blank')
}}
style={{ maxWidth: 200, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}
title={item.value}
>
{item.value}
</div>
),
}));
return (
<div className='projBox' key={item.projRenameApplyId}>
<div className='timeImg' style={{
backgroundImage: `url(${timeImg})`
}}>
<div> : {item.gmtCreate}</div>
</div>
<div className='projBoxTop'>
<div className='projName'
style={{
backgroundImage: `url(${titleBg})`
}}
onClick={() => {
nav(`/proj-edit/${item.projId}`);
sessionStorage.setItem('projName', item.projName);
sessionStorage.setItem('projStatus', item.generate.generateStatus == 'SUCCESS' ? '查看' : '编辑');
}} title={item.projName}>
{item.projName}
</div>
{/* <div style={{
display: 'flex',
}}>
{
tagCorArray.map((tagitem: any) => {
const [part1, part2] = tagitem.value.split(':');
if (part2 !== 'TAG_NOT') {
return (
<div key={tagitem.value} className='corrTypeC'
style={{
background: item.tagDataIds.includes(part1) ? 'var(--color-tagactive)' : '',
color: item.tagDataIds.includes(part1) ? '#ffffff' : '#5a5a5a',
border: item.tagDataIds.includes(part1) ? ' 1px solid var(--color-tagactive)' : ' 1px solid #5a5a5a',
}}
onClick={
(e: any) => {
post<any>({
messageApi,
url: `/api/proj/rename/apply/tag/save-or-delete`,
body: {
dataId: part1,
projRenameApplyId: item.projRenameApplyId,
projId: item.projId
},
onBefore() {
},
onSuccess(data) {
if (data.data.data === 'SAVE') {
e.target.style.background = 'var(--color-tagactive)';
e.target.style.color = '#ffffff';
e.target.style.border = '1px solid var(--color-tagactive)';
} else if (data.data.data === 'DELETE') {
e.target.style.background = '';
e.target.style.color = '#5a5a5a';
e.target.style.border = '1px solid #5a5a5a';
}
},
onFinally() {
}
})
}
}
>
{tagitem.label}
</div>
)
}
})
}
</div> */}
</div>
<div className='projBoxBot'>
<div className='boxTopL'>
<div className='numImg' style={{
backgroundImage: `url(${numbg})`
}}
>
{(page - 1) * 20 + index + 1}
</div>
<div className='projlogo'>
<img src={logoImg} className='projlogo' alt="" />
</div>
<div className='projInfo'>
<div className='projPeople' title={item.authorName}>
: {item.authorName ? item.authorName : '无'}
</div>
<div className='projImg'>
<div> </div>
<Dropdown menu={{
items: voucherItems,
}} placement="bottomLeft" arrow>
<div className='lookImg'
>()
</div>
</Dropdown>
</div>
</div>
</div>
<div className='projReason'>
<div className='projReasonTop'>
<img src={reason} className='reasonImg' alt="" />
<div className='yellowTitle'></div>
</div>
<div className='projBoxText' title={item.correctionReason}>
{item.renameReason}
</div>
</div>
<div className='projStatus'>
<div className='projStatusTop'>
<img className='projStatusImg' src={item.applyStatus == 'PENDING' ? blue : item.applyStatus == 'CANCELED' ? black : item.applyStatus == 'APPROVED' ? green : item.applyStatus == 'REJECTED' ? red : ''} alt="" />
<div
style={{ color: item.applyStatus == 'PENDING' ? '#1890FF' : item.applyStatus == 'CANCELED' ? '#979797' : item.applyStatus == 'APPROVED' ? '#52C41A' : item.applyStatus == 'REJECTED' ? '#FF0000' : '#FF0000' }}
>{item.applyStatus == 'PENDING' ? '待审核' : item.applyStatus == 'CANCELED' ? '已撤销' : item.applyStatus == 'APPROVED' ? '已通过' : item.applyStatus == 'REJECTED' ? '未通过' : '未知状态'}</div>
<div style={{ display: item.gmtReview ? 'block' : 'none', fontWeight: 400, marginLeft: 5 }}>{item.gmtReview}</div>
</div>
<div className='projBoxText statusprojBoxText' style={{ display: item.reviewReason ? 'block' : 'none' }} title={item.reviewReason}>
: {item.reviewReason}
</div>
</div>
<div className='zwBox'>
</div>
<div className='projBtn'
style={{ background: 'white' }}
>
<div className='setProj' style={{
// display: item.applyStatus == 'APPROVED' && item.type == 'CORRECTION1' && item.projStatus !== 'CLOSE' ? 'unset' : 'none',
// marginLeft: 10,
// textDecoration: 'underline',
display: item.applyStatus == 'APPROVED' && item.projStatus !== 'CLOSE' ? 'unset' : 'none',
}}
onClick={() => {
nav(
`/proj-new/MATERIAL?pkg=&videoDemo=`,
{
state: {
type: 'replace',
projId: item.projId,
}
}
);
}}
>
</div>
<div className='setProj' onClick={() => {
setRevokeModal(true)
setprojRenameApplyId(item.projRenameApplyId)
}}
style={{ display: item.applyStatus == 'PENDING' ? 'block' : 'none' }}
></div>
<div style={{
display: item.projStatus == 'CLOSE' ? 'block' : 'none',
fontSize: 16,
color: '#5a5a5a',
fontWeight: 700,
}}>
</div>
{/* <div className='setProj' onClick={() => {
setRevokeModal(true)
setprojCorrectionApplyId(item.projCorrectionApplyId)
}}
style={{ display: item.applyStatus == 'PENDING' ? 'block' : 'none' }}
></div>
<div style={{
display: item.projStatus == 'CLOSE' && item.type == 'CORRECTION1' ? 'block' : 'none',
fontSize: 16,
color: '#5a5a5a',
fontWeight: 700,
}}>
</div>
<div style={{
display: item.applyStatus == 'APPROVED' && item.projStatus !== 'CLOSE' || item.applyStatus == 'APPROVED' && item.type == 'CORRECTION2' ? 'block' : 'none' }}>
<div className='correctDownBox'>
<div className='correctDownBtn' style={{ display: item.correctionType == 'CODE' || item.correctionType == 'ALL' ? 'block' : 'none' }}>
<Dropdown menu={{
// items: downCode,
}} placement="bottomRight" arrow>
<span style={{ cursor: 'pointer' }}></span>
</Dropdown>
</div>
<div className='correctDownBtn' style={{ display: item.correctionType == 'MANUAL' || item.correctionType == 'ALL' ? 'block' : 'none' }}>
<Dropdown menu={{
// items: downManual,
}} placement="bottomRight" arrow>
<span style={{ cursor: 'pointer' }}></span>
</Dropdown>
</div>
</div>
</div> */}
</div>
</div>
</div>
)
})}
</>}
</Spin>
</div>
<div className='pagination'>
<Pagination current={page} total={total} pageSize={20} showSizeChanger={false} onChange={(page) => {
setPage(page)
getData(page)
}} />
</div>
<Modal
title="确认撤销"
okText="撤销"
cancelText="取消"
destroyOnClose={true}
open={revokeModal}
onOk={() => {
setRevokeModal(false)
projRefund()
}}
onCancel={() => {
setRevokeModal(false)
}}
okButtonProps={{ style: { background: 'red', color: 'white' } }}
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
height: `${height}px`,
}}>
<div style={{ width: 384, display: 'flex', height: 50, alignItems: 'center' }}>
<img src={revokeImg} alt="" style={{ width: 32, height: 32, marginLeft: 10 }} />
<div style={{ marginLeft: 10, fontSize: 18 }}>
</div>
</div>
</Modal>
</div>
)
}

View File

@ -17,12 +17,13 @@ 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 ReplaceModal from '../../components/ReplaceModal/ReplaceModal.tsx'
import ContractModal from '../../components/ContractModal/ContractModal.tsx'
import MenuWithBottomButtom from '../../components/menu/MenuWithBottomButton.tsx'
// import MenuWithBottomButtom from '../../components/menu/MenuWithBottomButton.tsx'
// import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
// import ListProj from "../../components/list/ListProj.tsx";
// import ListProjAgent from "../../components/list/ListProjAgent.tsx";
import { getMenuActive } from '../../util/cache.ts'
// import { getMenuActive } from '../../util/cache.ts'
import {
@ -85,10 +86,10 @@ interface DataType {
}
import app from '../../static/left/app.png'
import appnew from '../../static/left/appnew.png'
import tra from '../../static/left/tra.png'
import tranew from '../../static/left/tranew.png'
// import app from '../../static/left/app.png'
// import appnew from '../../static/left/appnew.png'
// import tra from '../../static/left/tra.png'
// import tranew from '../../static/left/tranew.png'
import topblack from '../../static/appimgs/topblack.png'
import topblue from '../../static/appimgs/topblue.png'
@ -467,6 +468,8 @@ export default function Index() {
{ id: 'REFUN', name: '退款项目' },
// correction
{ id: 'CORRECTION', name: '补正项目' },
{ id: 'REPLACENAME', name: '换名项目' },
{ id: 'CONTRACT', name: '合同下载' },
],
@ -1071,6 +1074,53 @@ export default function Index() {
// 换名搜索是否显示---------------------------------------------------------------------------------
const [replaceSearchBox, setReplaceSearchBox] = useState(false)
const [nowReplaceKeyWords, setNowReplaceKeyWords] = useState('') // 换名搜索关键字
const [replaceKeyWords, setReplaceKeyWords] = useState('') // 换名搜索关键字
const [replaceStatus, setReplaceStatus] = useState<string | null>(null) // 换名搜索状态
const repacleInit = () => {
setReplaceKeyWords('')
setNowReplaceKeyWords('')
setReplaceStatus(null)
setauthorId('')
setauthorName('')
setNowauthorId('')
setNowauthorName('')
setselectedRowKeys([]);
}
const [replaceModal, setReplaceModal] = useState(false) // 申请换名
// 换名搜索关键字
const replacehandleSearch = (value: string) => {
setReplaceKeyWords(value)
}
const replacehandleChange = (e: any) => {
setNowReplaceKeyWords(e.target.value)
if (e.target.value == '') {
setReplaceKeyWords('')
}
}
useEffect(() => {
if (location.pathname == '/replace') {
nav('/replace', {
state: {
keywords: replaceKeyWords,
applyStatus: replaceStatus,
authorId: authorId
}
})
}
}, [replaceKeyWords, replaceStatus, authorId])
// -----------------------------------------------------------------------------------------------
// 申请商标是否显示------------------------------------------------------------------------------
const [trademarkBox, setTrademarkBox] = useState(false) // 申请商标弹窗
@ -1331,6 +1381,8 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
} else if (location.pathname.includes('/proj-create')) {
setShowSearchBox(false)
setRrefunSearchBox(false)
@ -1342,6 +1394,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
setNow('创建项目')
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '创建项目' }])
@ -1358,6 +1411,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setEditname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '编辑项目' }])
@ -1373,6 +1427,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: '新建项目' }])
@ -1388,6 +1443,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '编辑项目' }])
@ -1403,6 +1459,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页 </Link> }, { title: '编辑项目' }])
@ -1418,6 +1475,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '标题简介' }])
@ -1433,6 +1491,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '基本信息' }])
@ -1448,6 +1507,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '登录界面设置' }])
@ -1463,6 +1523,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '系统菜单管理' }])
@ -1478,6 +1539,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '系统菜单顺序' }])
@ -1493,6 +1555,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '软件功能特点' }])
@ -1508,6 +1571,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(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')) {
@ -1522,6 +1586,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(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
@ -1537,6 +1602,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(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
@ -1552,6 +1618,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
@ -1569,6 +1636,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setPathArray([{ title: '首页' }])
// /config-mod-edit /product-release /transaction-order
@ -1584,6 +1652,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setPathArray([{ title: '首页' }])
// /config-mod-edit /product-release /transaction-order
@ -1599,6 +1668,7 @@ export default function Index() {
setTradingSearchBox(true)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setPathArray([{ title: '首页' }])
// /config-mod-edit /product-release /transaction-order
@ -1615,6 +1685,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '软件功能特点' }])
@ -1631,6 +1702,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '软件功能特点' }])
@ -1646,6 +1718,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
} else if (location.pathname.includes('/app-electron')) {
setShowSearchBox(false)
@ -1659,6 +1732,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(true)
setTrademarkBox(false)
setReplaceSearchBox(false)
} else if (location.pathname.includes('/app-edit')) {
setShowSearchBox(false)
@ -1672,6 +1746,7 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
}
else if (location.pathname.includes('/trademark-mall')) {
@ -1686,6 +1761,21 @@ export default function Index() {
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(true)
setReplaceSearchBox(false)
}
else if (location.pathname.includes('/replace')) {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setNow('首页 / 换名')
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(true)
}
}, [location.pathname])
@ -1766,6 +1856,7 @@ export default function Index() {
})
}
}, [type, chargeAdditionals, keywords, tagDataId, projRemindId, payStatus, authorId, refunKeywords, applyStatus, correctionKeywords, correctionNumType, correctionType, correctionApplyStatus, tagCor]);
// const [menuName,setMenuName] = useState<string | null>('')
@ -1974,7 +2065,7 @@ export default function Index() {
list={agentMenu.list}
handleListItem={agentMenu.handleListItem}
/> */}
{THEME == 'mzw' ? (
{/* {THEME == 'mzw' ? (
<>
<div style={{
background: getMenuActive() == 'APP' ? 'linear-gradient(90deg, #FF9F08 0%, #FF7331 100%)' : ' var(--color-menuback)',
@ -2066,7 +2157,7 @@ export default function Index() {
/>
) : (
<></>
)}
)} */}
{/* <MenuWithBottomButtom
@ -2893,6 +2984,154 @@ export default function Index() {
</Button>
</div>
</div>
<div style={{ display: replaceSearchBox ? 'block' : 'none' }}>
<div className='mediaSearch' style={{
display: 'flex',
alignItems: 'center'
}}>
<div className='mediaLine'>
<div className='line' style={{
}} ></div>
</div>
<Button type="primary" onClick={() => {
setReplaceModal(true)
repacleInit()
// dispath({
// type: 'newCorrection',
// val: true
// })
}}
style={{ background: 'var(--color-searchbtn)' }}
>
</Button>
<Search placeholder="输入项目名称"
value={nowReplaceKeyWords}
onSearch={replacehandleSearch}
onChange={replacehandleChange}
style={{
width: '160px',
height: '31px',
marginLeft: 5
}}
allowClear
/>
<Select
value={replaceStatus}
style={{ height: '31px', width: '120px', marginLeft: 5 }}
onChange={(value: string) => {
setReplaceStatus(value)
}}
options={[
// { value: '', label: '全部项目' },
{ value: 'PENDING', label: '待审核' },
{ value: 'APPROVED', label: '已通过' },
{ value: 'REJECTED', label: '未通过' },
{ value: 'CANCELED', label: '已取消' },
]}
// defaultValue=""
placeholder={'选择状态'}
allowClear
/>
<div style={{
position: 'relative',
}}>
<Input placeholder='选择所属者'
value={authorName}
style={{
height: '31px', width: '110px', marginLeft: 5,
paddingRight: 20,
// 超出部分用...显示
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
}}></Input>
<div
title={authorName}
style={{
position: 'absolute',
height: '31px', width: '110px',
// background: 'skyblue',
top: 0,
left: 5,
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
paddingRight: 10,
boxSizing: 'border-box',
}}
onClick={() => {
// setauthorName('哈哈哈哈哈哈哈哈哈哈嘎嘎嘎嘎嘎嘎')
setOwnerPage(1)
getProjOwnerList(1, '')
setSelectBelongPeople(true)
setselectedRowKeys([])
setNowauthorId('')
setNowauthorName('')
// nav('/home', {
// state: {
// keyword: keywords,
// type: type,
// chargeAdditionals: chargeAdditionals,
// tagDataId: tagDataId,
// authorId: '1',
// payStatus: payStatus,
// projRemindId: projRemindId,
// // tagNot
// }
// })
}}
>
</div>
<CloseCircleOutlined
className='clearIcon'
style={{
top: 8,
right: 5,
position: 'absolute',
color: '#FFF',
// background: '#868686',
borderRadius: '50%',
fontSize: 14,
display: authorName ? 'unset' : 'none',
marginTop: 1,
}}
title=''
onClick={() => {
setauthorName('')
setauthorId('')
setNowauthorId('')
setNowauthorName('')
setselectedRowKeys([]);
nav('/replace', {
state: {
keywords: replaceKeyWords,
applyStatus: replaceStatus,
authorId: '',
}
})
}}
/>
</div>
<Button onClick={() => {
repacleInit()
}} style={{ marginLeft: 5, height: 31 }}
// type="primary"
icon={<ClearOutlined />}>
</Button>
</div>
</div>
<div style={{ display: contractSearchBox ? 'block' : 'none' }}>
<div className='mediaSearch' style={{
display: 'flex',
@ -3314,7 +3553,7 @@ export default function Index() {
style={{ background: 'var(--color-searchbtn)' }}
onClick={() => {
setAppModal(true)
setAppGoodsId('')
setAppGoodsId('')
}}
></Button>
<Search
@ -3548,6 +3787,23 @@ export default function Index() {
<CorrectionModal closeModal={() => { setCorrectionModal(false) }}
></CorrectionModal>
</Modal>
<Modal
title="申请换名"
destroyOnClose={true}
open={replaceModal}
footer={null}
maskClosable={false} // 禁止通过点击蒙层关闭
onCancel={() => {
setReplaceModal(false)
}}
okButtonProps={{ style: { background: 'red', color: 'white' } }}
width={592}
centered
>
<ReplaceModal closeModal={() => { setReplaceModal(false) }}
></ReplaceModal>
</Modal>
<Modal
title="新增合同"
destroyOnClose={true}
@ -3823,7 +4079,7 @@ export default function Index() {
footer={null}
onCancel={() => {
setAppModal(false)
}}
okButtonProps={{ style: { background: 'red', color: 'white' } }}
width={830}

View File

@ -11,6 +11,7 @@ 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 Replace from '../route/Replace/Replace.tsx';
import Index from "../route/index/Index.tsx";
// import Search from "../route/SearchList/SearchList.tsx";
import ProjCreate from "./proj/ProjCreate.tsx";
@ -261,6 +262,10 @@ export const router = createHashRouter(
{
path: '/contract',
element: <Contract />
},
{
path: '/replace',
element: <Replace />
},
{
path: '/proj-create',

View File

@ -26,6 +26,9 @@ const baseState = {
},
phoneModal: false,
appGoodsListData: {},
replaceArray: [],
replaceTotal: 0,
newReplace: false,
}
// 创建仓库
@ -52,6 +55,9 @@ const reducer = (state = baseState, action: any) => {
if (action.type == 'upCorrectionArray') {
nstate.correctionArray = action.val
}
if (action.type == 'upReplaceArray') {
nstate.replaceArray = action.val
}
if (action.type == 'upContractArray') {
nstate.contractArray = action.val
}
@ -61,6 +67,9 @@ const reducer = (state = baseState, action: any) => {
if (action.type == 'upCorrectionTotal') {
nstate.correctionTotal = action.val
}
if (action.type == 'upReplaceTotal') {
nstate.replaceTotal = action.val
}
if (action.type == 'changeCouponModal') {
nstate.couponModal = action.val
}
@ -85,6 +94,9 @@ const reducer = (state = baseState, action: any) => {
if (action.type == 'upAppGoodsListData') {
nstate.appGoodsListData = action.val
}
if (action.type == 'newReplace') {
nstate.newReplace = action.val
}
return nstate
}
const store = createStore(reducer)