system-copyright-react/src/route/index/Index.tsx
2025-05-30 17:40:42 +08:00

4411 lines
215 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import './index.css';
// import { MouseEvent, Reducer, useEffect, useReducer, useState, useContext } from "react";
import { MouseEvent, Reducer, useEffect, useReducer, useState, useContext } from "react";
import { useSelector, useDispatch } from 'react-redux'
import { useNavigate, useSearchParams, Outlet } from "react-router-dom";
import { GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
import {
Modal,
// Row,
DatePicker,
InputNumber
} from 'antd';
import locale from 'antd/es/date-picker/locale/zh_CN';
import type { DatePickerProps, InputNumberProps } from 'antd';
import dayjs, { } from 'dayjs';
import { IMenuListItem, IMenuWithTopButton } from "../../interfaces/menu/IMenuWithTopButton.ts";
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 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 {
MenuProps, Select,
Button,
// Pagination,
// Empty
Table,
Spin
} from 'antd';
import EditModal from '../ProductRelease/components/EditModal/EditModal'
import {
IndexListContext,
IndexListDataType,
IndexListDispatchContext,
ListAction,
ListData,
} from "../../context/IndexListContext.ts";
// import { getMenuActive } from '../../util/cache.ts'
import {
// MenuFoldOutlined,
ClearOutlined,
CloseOutlined,
CloseCircleOutlined
} from '@ant-design/icons';
import { useLocation } from 'react-router-dom';
import {
get,
// downloadUrl,
post, getCouponUrl
} from '../../util/AjaxUtils.ts'
import {
// getLanguageList, getSoftTypeList
appGoodsList, buyAppGoods, appOrderList
} from '../../request/api'
import {
setMenuActive,
// getMenuActive
} from '../../util/cache.ts'
import gpsImg from '@theme/img/right/gps.png'
import backImg from '@theme/img/right/back.png'
// import { Link } from "react-router-dom";
import HeadCouponModal from '../../components/CouponModal/HeadCouponModal.tsx'
import {
Input,
// Breadcrumb,
Empty,
message
} from 'antd';
import type { TableColumnsType } from 'antd';
const { Search } = Input;
interface DataType {
key: React.Key;
name: string;
type: string;
idCardType: string;
idCardNo: string;
projOwnerId: string
}
// 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'
import right from '../../static/trademark/right.png'
import yes from '../../static/trademark/yes.png'
import firImg from '../../static/fir.png'
import noFirImg from '../../static/noFir.png'
export default function Index() {
const globalDispatchContext = useContext(GlobalDispatchContext);
// const height = window.innerHeight - 180;
const columns: TableColumnsType<DataType> = [
{
title: '序号',
dataIndex: 'index',
align: 'center',
width: 80,
render: (_text, _record, index) => (ownerPage - 1) * 10 + index + 1, // 显示序号从1开始
},
{
title: '名称',
dataIndex: 'name',
align: 'center',
// width:100,
ellipsis: {
showTitle: true,
},
},
{
title: '类型',
dataIndex: 'type',
align: 'center',
width: 130,
render: (text: string) => <>{text == 'PERSONAL' ? '个人' : text == 'ORGANIZATION' ? '企业' : '未知类型'}</>,
},
{
title: '证件类型',
dataIndex: 'idCardType',
align: 'center',
render: (text: string) => <>{text == 'ID_CARD' ? '身份证' : text == 'BUSINESS_LICENSE' ? '营业执照' : '未知类型'}</>,
},
{
title: '证件号',
dataIndex: 'idCardNo',
align: 'center',
width: 300
},
];
// 是否可以点击所属者 (当点击了退款选项,所属者列表跟他不产生联系 不给他点)
// const [clickBelongpeople, setClickBelongpeople] = useState(true)
// 补正搜索条件标签数组
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 [tagCor, setTagCor] = useState<string | null>(null)
// 选项数组
const [tagArray, setTagArray] = useState([])
// const[tagNot,setTagNot] = useState(false)
// 获取标签
const getTag = () => {
get({
messageApi,
url: `/api/proj/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);
setTagArray(newarrty)
},
onFinally() {
}
})
}
// 提示数组
const [remindTagArray, setRemindTagArray] = useState([])
// 获取提示
const getremindTag = () => {
get({
messageApi,
url: `/api/proj/remind/list`,
onBefore() {
},
onSuccess(data: any) {
// console.log('标签信息', data.data);
const newarrty: any = (data.data).map((item: any) => ({
value: item.projRemindId,
label: item.title
}));
// console.log('标签信息', newarrty);
setRemindTagArray(newarrty)
},
onFinally() {
}
})
}
const dispath = useDispatch()
//redux的belongArray
const redxuState: any = useSelector(state => state)
const phoneModal = redxuState.phoneModal
// const belongArray = redxuState.belongArray
// const belongArrayList = belongArray.map((item:any) => ({
// value: item.projOwnerId ,
// label: item.name
// }));
// 优惠券弹窗
const couponModal = redxuState.couponModal
// 编辑项目得项目名
// const projName = redxuState.projName
// 从sessionStorage缓存获取项目名
const projName = sessionStorage.getItem('projName')
// 项目状态 查看还是编辑
// const projStatus = redxuState.projStatus
const projStatus = sessionStorage.getItem('projStatus')
const [loading, setLoading] = useState(false) //表格加载
const [selectBelongPeople, setSelectBelongPeople] = useState(false) //有项目的所属者弹窗
const [ownerPage, setOwnerPage] = useState(1) //有项目的所属者表格页码
const [ownerTotal, setOwnerToatl] = useState(0) //有项目的所属者表格总数居
const [ownerKeyWords, setOwnerKeyWords] = useState('') //在有项目的所属者表格搜索时的关键字
const [ownerList, setOwnerList] = useState([])
// 获取所属者表格储存至redux 更新表格 (已弃用)
// 获取有项目所属者表格
const getProjOwnerList = (page: number, keywords: string) => {
get({
messageApi,
url: `/api/proj-owner/listpage/self`,
// 参数
config: {
params: {
page: page,
rows: 10,
keywords: keywords
}
},
onBefore() {
setLoading(true)
},
onSuccess({ data }: any) {
// console.log('所属者表格', data.data);
// setBelongPeopleArray(data.data)
// 存redux的belongArray
// dispath({
// type: 'uparray',
// val: data.data
// })
setOwnerList(data.rows)
// setOwnerList([])
setOwnerToatl(data.total)
// console.log(data);
},
onFinally() {
setLoading(false)
}
})
}
// 表格被选的项
const [selectedRowKeys, setselectedRowKeys] = useState<string[]>([])
// 更新数据
// const upBelongArray = () => {
// get({
// messageApi,
// url: `/api/proj-owner/list/self`,
// onBefore() {
// },
// onSuccess(data: any) {
// // console.log('所属者表格', data.data);
// setBelongPeopleArray(data.data)
// },
// onFinally() {
// }
// })
// }
// 监听redux的belongArray
// useEffect(()=>{
// },[belongArray])
const [messageApi, contextHolder] = message.useMessage();
// 临时关键字 (过度)
const [nowKeyword, setNowKeyWord] = useState('')
// 关键字
const [keywords, setKeywords] = useState('');
const [type, setType] = useState<string | null>(null)
const [chargeAdditionals, setchargeAdditionals] = useState<string | null>(null)
const [tagDataId, settagDataId] = useState<string | null>(null)
const [payStatus, setpayStatus] = useState<string | null>(null)
const [nowauthorId, setNowauthorId] = useState('') //临时id
const [authorId, setauthorId] = useState<string>('') //所属者id
const [nowauthorName, setNowauthorName] = useState<string>('') //临时名称
const [authorName, setauthorName] = useState<string>('') //所属者名称
const [projRemindId, setprojRemindId] = useState<string | null>(null)
//退款状态
const [applyStatus, setapplyStatus] = useState<string | null>(null)
// 退款关键字
const [refunKeywords, setrefunKeywords] = useState('')
// 退款临时关键字
const [newRefunValue, setnewRefunValue] = useState('')
//补正搜索相关
// 补正关键字
const [correctionKeywords, setcorrectionKeywords] = useState('')
// 补正临时关键字
const [newCorrectionValue, setnewCorrectionValue] = useState('')
// 补正类型
const [correctionNumType, setcorrectionNumType] = useState<string | null>(null)
// 补正种类
const [correctionType, setcorrectionType] = useState<string | null>(null)
// 补正状态
const [correctionApplyStatus, setcorrectionApplyStatus] = useState<string | null>(null)
// const indexListContext = useContext(IndexListContext);
// 所属者信息
// const [belongPeopleArray, setBelongPeopleArray] = useState<any[]>([])
// const [currentPage, setCurrentPage] = useState(1);
// const itemsPerPage = 5;
// 计算总页数
// const totalItems = belongArray.length;
// const totalPages = Math.ceil(totalItems / itemsPerPage);
// 计算当前页数据的起始和结束索引
// const startIndex = (currentPage - 1) * itemsPerPage;
// const endIndex = Math.min(startIndex + itemsPerPage, totalItems);
// 提取当前页的数据
// const currentPageData = belongArray.slice(startIndex, endIndex);
// 处理页码切换
// const handlePageChange = (page: number) => {
// if (page >= 1 && page <= totalPages) {
// setCurrentPage(page);
// }
// };
const nav = useNavigate();
// // home页初始化搜索条件
const init = () => {
setNowKeyWord('')
setKeywords('')
setType(null)
setchargeAdditionals(null)
settagDataId(null)
setpayStatus(null)
setprojRemindId(null)
nav('/home')
setauthorId('')
setauthorName('')
setNowauthorId('')
setNowauthorName('')
setselectedRowKeys([]);
}
// 退款页初搜索条件始化
const refunInit = () => {
setnewRefunValue('')
setrefunKeywords('')
setapplyStatus(null)
setauthorId('')
setauthorName('')
setNowauthorId('')
setNowauthorName('')
setselectedRowKeys([]);
// 刷新当前页面
}
// 补正页面搜索条件初始化
const correctionInit = () => {
setnewCorrectionValue('')
setcorrectionKeywords('')
setcorrectionNumType(null)
setcorrectionType(null)
setcorrectionApplyStatus(null)
setTagCor(null)
setauthorId('')
setauthorName('')
setNowauthorId('')
setNowauthorName('')
setselectedRowKeys([]);
}
const [searchParams] = useSearchParams();
const listReducer = (state: ListData, action: ListAction) => {
if (action.type == IndexListDataType.PROJ) {
state.type = IndexListDataType.PROJ;
state.status = action.value as string;
} else if (action.type == IndexListDataType.AGENT) {
state.type = IndexListDataType.AGENT;
state.status = action.value as string;
} else if (action.type == IndexListDataType.CATEGORY) {
state.categorys = action.value as MenuProps['items'];
state.categoryChangeCount++;
} else if (action.type == IndexListDataType.CATEGORY_CHANGE) {
state.category = action.value as string;
state.categoryChangeCount++;
} else if (action.type == IndexListDataType.CATEGORY_DELETE) {
state.categorys = action.value as MenuProps['items'];
state.category = '';
state.categoryChangeCount++;
}
return {
...state
};
}
const [listData, dispatch] = useReducer<Reducer<ListData, ListAction>>(listReducer, {
type: IndexListDataType.PROJ,
categoryChangeCount: 0
});
const [projMenu, setProjMenu] = useState<IMenuWithTopButton>({
button: {
name: '项目',
handle() {
dispatch({
type: IndexListDataType.PROJ,
value: 'ALL',
})
init()
setauthorId('')
// nav('/home')
nav('/proj-create')
}
},
list: [
{ id: 'ALL', name: '全部项目', active: true },
{ id: 'PROCESSING', name: '进行中的' },
{ id: 'COMPLETE', name: '已完成的' },
{ id: 'REFUN', name: '退款项目' },
// correction
{ id: 'CORRECTION', name: '补正项目' },
{ id: 'REPLACENAME', name: '换名项目' },
{ id: 'CONTRACT', name: '合同下载' },
],
handleListItem(_e, _index, item: IMenuListItem) {
// setauthorId('')
// setauthorName('')
projMenu.list.forEach(item => item.active = false);
sellMenu.list.forEach(item => item.active = false);
buyMenu.list.forEach(item => item.active = false);
// refundMenu.list.forEach(item => item.active = false);
// correctionMenu.list.forEach(item => item.active = false);
item.active = true;
setProjMenu({
...projMenu
})
dispatch({
type: IndexListDataType.PROJ,
value: item.id,
// keywords: ''
})
},
});
const [refunModal, setRefunModal] = useState(false) //退款弹窗
// const [refundMenu, setRefundMenu] = useState<IMenuWithTopButton>({
// button: {
// name: '',
// handle() {
// // nav('/proj-create')
// }
// },
// list: [
// { id: 'PENDING', name: '待审核', },
// { id: 'APPROVED', name: '已通过' },
// { id: 'REJECTED', name: '未通过' },
// { id: 'CANCELED', name: '已取消' }
// ],
// handleListItem(_e, _index, item: IMenuListItem) {
// projMenu.list.forEach(item => item.active = false);
// sellMenu.list.forEach(item => item.active = false);
// buyMenu.list.forEach(item => item.active = false);
// // refundMenu.list.forEach(item => item.active = false);
// // correctionMenu.list.forEach(item => item.active = false);
// item.active = true;
// setRefundMenu({
// ...refundMenu
// })
// dispatch({
// type: IndexListDataType.PROJ,
// value: item.id,
// // keywords: ''
// })
// },
// });
// 补正弹窗
const [correctionModal, setCorrectionModal] = useState(false)
// const [correctionMenu, setCorrectionMenu] = useState<IMenuWithTopButton>({
// button: {
// name: '补正',
// handle() {
// // nav('/proj-create')
// setCorrectionModal(true)
// }
// },
// list: [
// { id: 'Correction-PENDING', name: '待审核', },
// { id: 'Correction-APPROVED', name: '已通过' },
// { id: 'Correction-REJECTED', name: '未通过' },
// { id: 'Correction-CANCELED', name: '已取消' }
// ],
// handleListItem(_e, _index, item: IMenuListItem) {
// projMenu.list.forEach(item => item.active = false);
// sellMenu.list.forEach(item => item.active = false);
// buyMenu.list.forEach(item => item.active = false);
// refundMenu.list.forEach(item => item.active = false);
// correctionMenu.list.forEach(item => item.active = false);
// item.active = true;
// setCorrectionMenu({
// ...correctionMenu
// })
// dispatch({
// type: IndexListDataType.PROJ,
// value: item.id,
// // keywords: ''
// })
// },
// })
// 新增合同弹窗
const [contractModal, setContractModal] = useState(false)
// const [agentMenu, setAgentMenu] = useState<IMenuWithTopButton>({
// button: {
// name: '代理服务',
// handle() {
// dispatch({
// type: IndexListDataType.PROJ,
// value: 'COMPLETE',
// })
// }
// },
// list: [
// { id: 'ALL', name: '全部项目' },
// { id: 'PROCESSING', name: '进行中的' },
// { id: 'COMPLETE', name: '已完成的' },
// ],
// handleListItem(_e: MouseEvent<HTMLLIElement>, _index: number, item: IMenuListItem) {
// projMenu.list.forEach(item => item.active = false);
// agentMenu.list.forEach(item => item.active = false);
// item.active = true;
// setAgentMenu({
// ...agentMenu
// })
// dispatch({
// type: IndexListDataType.AGENT,
// value: item.id,
// })
// }
// })
const [sellMenu, setSellMenu] = useState<IMenuWithTopButton>({
button: {
name: '交易商城',
handle() {
// dispatch({
// type: IndexListDataType.PROJ,
// value: 'COMPLETE',
// })
}
},
list: [
{ id: 'PRODUCT', name: '我要卖软著' }, //原商品发布
{ id: 'TRABSACTION', name: '已销售软著' },
{ id: 'COPYRIGHT', name: '我要买软著' },
{ id: 'TRADING', name: '已购买软著' },
// { id: 'COMPLETE', name: '已完成的' },
],
handleListItem(_e: MouseEvent<HTMLLIElement>, _index: number, item: IMenuListItem) {
projMenu.list.forEach(item => item.active = false);
sellMenu.list.forEach(item => item.active = false);
buyMenu.list.forEach(item => item.active = false);
// refundMenu.list.forEach(item => item.active = false);
// correctionMenu.list.forEach(item => item.active = false);
item.active = true;
setSellMenu({
...sellMenu
})
dispatch({
type: IndexListDataType.AGENT,
value: item.id,
})
}
})
const [buyMenu, setBuyMenu] = useState<IMenuWithTopButton>({
button: {
name: '我要买',
handle() {
// dispatch({
// type: IndexListDataType.PROJ,
// value: 'COMPLETE',
// })
}
},
list: [
{ id: 'COPYRIGHT', name: '著作权商品' },
{ id: 'TRADING', name: '交易商品' },
// { id: 'COMPLETE', name: '已完成的' },
],
handleListItem(_e: MouseEvent<HTMLLIElement>, _index: number, item: IMenuListItem) {
projMenu.list.forEach(item => item.active = false);
sellMenu.list.forEach(item => item.active = false);
buyMenu.list.forEach(item => item.active = false);
// refundMenu.list.forEach(item => item.active = false);
// correctionMenu.list.forEach(item => item.active = false);
item.active = true;
setBuyMenu({
...buyMenu
})
dispatch({
type: IndexListDataType.AGENT,
value: item.id,
})
}
})
// const [refund, setRefund] = useState<IMenuWithTopButton>({
// button: {
// name: '退款',
// handle() {
// // dispatch({
// // type: IndexListDataType.PROJ,
// // value: 'COMPLETE',
// // })
// }
// },
// list: [
// { id: '1', name: '待审核', path: '/copyright-goods?item=1' },
// { id: '2', name: '已通过', path: '/copyright-goods?item=2' },
// { id: '3', name: '未通过', path: '/copyright-goods?item=3' },
// // { id: 'COMPLETE', name: '已完成的' },
// ],
// handleListItem(_e: MouseEvent<HTMLLIElement>, _index: number, item: IMenuListItem) {
// projMenu.list.forEach(item => item.active = false);
// // sellMenu.list.forEach(item => item.active = false);
// // buyMenu.list.forEach(item => item.active = false);
// item.active = true;
// setRefund({
// ...refund
// })
// // dispatch({
// // type: IndexListDataType.AGENT,
// // value: item.id,
// // })
// }
// })
const location = useLocation()
const [now, setNow] = useState<string>('首页 / 项目')
// 编辑项目路由名
// const [editname,setEditname] = useState('')
// 新建项目路由名字
// const [newname,setNewname] = useState('')
// const [pathArray, setPathArray] = useState<any>([])
const [showSearchBox, setShowSearchBox] = useState(true)
const [refunSearchBox, setRrefunSearchBox] = useState(false)
// 商品发布搜索框是否显示------------------------------------------------------------------------
const [sellModal, setSellModal] = useState(false) // 商品发布弹窗
const [sellNewKeywords, setSellNewKeywords] = useState('') // 关键字
const [sellKeywords, setSellKeywords] = useState('') // 关键字
const [sellSearchBox, setSellSearchBox] = useState(false)
const [sellBelongType, setSellBelongType] = useState<string | null>(null) // 所属人类型
// 更改所属人类型
const sellBelongTypeChange = (value: string) => {
// console.log(`selected ${value}`);
setSellBelongType(value)
}
const [sellDate, setSellDate] = useState<any | null>(null) // 日期
const dateFormat = 'YYYY年MM月DD日';
// 更改日期
const sellDateonChange: DatePickerProps['onChange'] = (date, dateString) => {
console.log(date, dateString);
setSellDate(date)
// dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat),
console.log('日期', dayjs(date).format(dateFormat));
};
const [language, setLanguage] = useState<string | null>(null) // 开发者语言
// 更改开发者语言
const selectLanguage = (value: string) => {
setLanguage(value)
}
const [sellBoxtype, setSellBoxType] = useState<string | null>(null) //软著类型
// 选择软著类型
const selectType = (value: string) => {
setSellBoxType(value)
}
// 更改关键字
const sellKeyWordshandleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setSellNewKeywords(e.target.value)
if (e.target.value == '') {
setSellKeywords('')
}
}
// 关键字搜索
const sellKeyWordshandleSearch = () => {
setSellKeywords(sellNewKeywords)
// nav('/product-release', {
// state: {
// sellKeywords: sellNewKeywords,
// sellBelongType: sellBelongType,
// sellDate: sellDate,
// language: language,
// sellBoxtype: sellBoxtype,
// }
// })
}
// 商品发布页面搜索条件初始化
const sellInit = () => {
setSellDate(null)
setSellBelongType(null)
setLanguage(null)
setSellBoxType(null)
setSellNewKeywords('')
setSellKeywords('')
}
useEffect(() => {
if (location.pathname == '/product-release') {
nav('/product-release', {
state: {
sellKeywords: sellKeywords,
sellBelongType: sellBelongType,
sellDate: sellDate,
language: language,
sellBoxtype: sellBoxtype,
}
})
}
}, [sellBelongType, sellDate, language, sellBoxtype, sellKeywords])
// ----------------------------------------------------------------------------------------------
// 交易订单搜索框是否显示--------------------------------------------------------------------------
const [sellOrderSearchBox, setSellOrderSearchBox] = useState(false)
const [sellOrderNewKeywords, setSellOrderNewKeywords] = useState('') // 临时关键字
const [sellOrderKeywords, setSellOrderKeywords] = useState('') // 关键字
const [sellStatrtTime, setSellStatrtTime] = useState<any | null>(null) // 开始时间
const [sellEndTime, setSellEndTime] = useState<any | null>(null) // 结束时间
const [sellOrderStatus, setSellOrderStatus] = useState<string | null>(null) // 订单状态
const sellOrderKeyWordshandleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setSellOrderNewKeywords(e.target.value)
if (e.target.value == '') {
setSellOrderKeywords('')
}
}
const sellOrderKeyWordshandleSearch = () => {
setSellOrderKeywords(sellOrderNewKeywords)
}
// 更改开始时间
const sellStratTimeChange: DatePickerProps['onChange'] = (date, dateString) => {
console.log(date, dateString);
setSellStatrtTime(date)
};
// 更改结束时间
const sellEndTimeChange: DatePickerProps['onChange'] = (date, dateString) => {
console.log(date, dateString);
setSellEndTime(date)
};
// 更改订单状态
const sellOrderStatusChange = (value: string) => {
console.log(`selected ${value}`);
setSellOrderStatus(value)
}
const sellOrderInit = () => {
setSellStatrtTime(null)
setSellEndTime(null)
setSellOrderStatus(null)
setSellOrderNewKeywords('')
setSellOrderKeywords('')
}
useEffect(() => {
if (location.pathname == '/transaction-order') {
nav('/transaction-order', {
state: {
sellStatrtTime: sellStatrtTime,
sellEndTime: sellEndTime,
sellOrderStatus: sellOrderStatus,
sellOrderKeywords: sellOrderKeywords,
}
})
}
}, [sellStatrtTime, sellEndTime, sellOrderStatus, sellOrderKeywords])
// ----------------------------------------------------------------------------------------------
// 著作权商品搜索框是否显示--------------------------------------------------------------------------
const [copyrightSearchBox, setCopyrightSearchBox] = useState(false)
const [copyrightNewKeywords, setCopyrightNewKeywords] = useState('') // 临时关键字
const [copyrightKeywords, setCopyrightKeywords] = useState('') // 关键字
const [minPrice, setMinPrice] = useState<any>() //最低价格
const [maxPrice, setMaxPrice] = useState<any>() //最高价格
const [sort, setSort] = useState<any>() //排序
const [copyrightDate, setCopyrightDate] = useState<any>() //获取时间
const [copyrightLanguage, setCopyrightLanguage] = useState<any>() //开发语言
const [copyrightType, setCopyrightType] = useState<any>() //软著类型
// 更改最低价格
const minPriceChange: InputNumberProps['onChange'] = (value) => {
console.log('changed', value);
setMinPrice(value)
};
// 更改最高价格
const maxPriceChange: InputNumberProps['onChange'] = (value) => {
console.log('changed', value);
setMaxPrice(value)
};
// 更改价格排序
const sortChange = (value: string) => {
console.log(`selected ${value}`)
setSort(value)
}
// 获取时间更改
const copyrightDateChange: DatePickerProps['onChange'] = (date, dateString) => {
console.log(date, dateString);
setCopyrightDate(date)
};
// 更改开发语言
const copyrightLanguageChange = (value: string) => {
console.log(`selected ${value}`)
setCopyrightLanguage(value)
}
// 软著类型更改
const copyrightTypeChange = (value: string) => {
console.log(`selected ${value}`)
setCopyrightType(value)
}
const copyrightKeyWordshandleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setCopyrightNewKeywords(e.target.value)
if (e.target.value == '') {
setCopyrightKeywords('')
}
}
const copyrightKeyWordshandleSearch = () => {
setCopyrightKeywords(copyrightNewKeywords)
}
const [specialPrice, setSpecialPrice] = useState(false) //商品特价标识
const copyrightInit = () => {
setMinPrice(null)
setMaxPrice(null)
setSort(null)
setCopyrightDate(null)
setCopyrightLanguage(null)
setCopyrightType(null)
setCopyrightNewKeywords('')
setCopyrightKeywords('')
// 清除特价标识
setSpecialPrice(false)
}
useEffect(() => {
if (location.pathname == '/copyright-goods') {
nav('/copyright-goods', {
state: {
copyrightKeywords: copyrightKeywords,
minPrice: minPrice,
maxPrice: maxPrice,
sort: sort,
copyrightDate: copyrightDate,
copyrightLanguage: copyrightLanguage,
copyrightType: copyrightType,
// 新增特价标识
goodsFlag: specialPrice ? '特价' : ''
}
})
}
}, [copyrightKeywords, minPrice, maxPrice, sort, copyrightDate, copyrightLanguage, copyrightType, specialPrice])
// ----------------------------------------------------------------------------------------------
// 交易商品搜索框是否显示--------------------------------------------------------------------------
const [tradingSearchBox, setTradingSearchBox] = useState(false)
const [tradingNewKeywords, setTradingNewKeywords] = useState('') // 临时关键字
const [tradingKeywords, setTradingKeywords] = useState('') // 关键字
const [tradingStartTime, setTradingStartTime] = useState<any>() // 开始时间
const [tradingEndTime, setTradingEndTime] = useState<any>() // 结束时间
const [tradingStatus, setTradingStatus] = useState<any>() // 订单状态
const tradingKeyWordshandleSearch = () => {
setTradingKeywords(tradingNewKeywords)
}
const tradingKeyWordshandleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setTradingNewKeywords(e.target.value)
if (e.target.value == '') {
setTradingKeywords('')
}
}
const tradingStartTimeChange: DatePickerProps['onChange'] = (date, dateString) => {
console.log(date, dateString);
setTradingStartTime(date)
}
const tradingEndTimeChange: DatePickerProps['onChange'] = (date, dateString) => {
console.log(date, dateString);
setTradingEndTime(date)
}
const tradingOrderStatusChange = (value: string) => {
console.log(`selected ${value}`)
setTradingStatus(value)
}
const tradingInit = () => {
setTradingStartTime(null)
setTradingEndTime(null)
setTradingStatus(null)
setTradingNewKeywords('')
setTradingKeywords('')
}
useEffect(() => {
if (location.pathname == '/trading-goods') {
nav('/trading-goods', {
state: {
tradingKeywords: tradingKeywords,
tradingStartTime: tradingStartTime,
tradingEndTime: tradingEndTime,
tradingStatus: tradingStatus,
}
})
}
}, [tradingKeywords, tradingStartTime, tradingEndTime, tradingStatus])
// ----------------------------------------------------------------------------------------------
// APP电子软著框是否显示----------------------------------------------------------------------------------------
const [appSearchBox, setAppSearchBox] = useState(false)
const [appKeyWords, setAppKeyWords] = useState('') // 电子软著搜索关键字
const [showAppkeyWords, setShowAppkeyWords] = useState('') // 电子软著搜索关键字显示
const [appModal, setAppModal] = useState(false) // 申请电子软著弹窗
const [toEditsModal, setToEditsModal] = useState(false) // 电子软著编辑弹窗
const [appGoodsArray, setAppGoodsArray] = useState<any>([]) // 电子软著可选商品列表
const [buyLoading, setBuyLoading] = useState(false) // 购买loading
const [appOrderId, setAppOrderId] = useState<any>() // 电子软著订单id
const [appExamineStatus, setAppExamineStatus] = useState<string | null>(null) // 电子软著审核状态
const [appApplyStatus, setAppApplyStatus] = useState<string | null>(null) // 电子软著申请状态
const appInit = () => {
setAppKeyWords('')
setShowAppkeyWords('')
setAppExamineStatus(null)
setAppApplyStatus(null)
}
const getAppOrderList = async (page: number) => {
try {
const res: any = await appOrderList({ page, keywords: '', rows: 10 })
dispath({
type: 'upAppGoodsListData',
val: res
})
} catch (error: any) {
if (error.response) {
const data = error.response.data;
messageApi.open({
type: 'error',
content: data.msg ? data.msg : `${data.path}(${data.status})`,
});
} else {
console.error(error)
}
} finally {
setLoading(false)
}
}
//电子软著点击搜索
const handleAppSearch = (value: string) => {
setAppKeyWords(value)
// nav('/app-electron', {
// state: {
// appKeyWords: value,
// }
// })
}
// 电子软著删除关键字
const handleAppChange = (e: any) => {
setShowAppkeyWords(e.target.value)
if (e.target.value == '') {
setAppKeyWords('')
}
}
useEffect(() => {
if (location.pathname == '/app-electron') {
nav('/app-electron', {
state: {
appKeyWords: appKeyWords,
checkStatus: appExamineStatus,
appOrderStatus: appApplyStatus
}
})
}
}, [appKeyWords, appExamineStatus, appApplyStatus])
// 获取电子软著可选商品列表
const getAppGoodsList = async () => {
try {
const res = await appGoodsList()
// console.log('电子软著可选商品列表', res);
setAppGoodsArray(res)
} catch (error: any) {
if (error.response) {
const data = error.response.data;
messageApi.open({
type: 'error',
content: data.msg ? data.msg : `${data.path}(${data.status})`,
});
} else {
console.error(error)
}
}
}
// -----------------------------------------------------------------------------------------------
// 换名搜索是否显示---------------------------------------------------------------------------------
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) // 申请商标弹窗
const [trademarkModal, setTrademarkModal] = useState(false) // 申请商标弹窗
// const [toRradeMarkModal, setToRradeMarkModal] = useState(false) // 申请商标编辑弹窗
// ----------------------------------------------------------------------------------------------------
const [correctionSearchBox, setCorrectionSearchBox] = useState(false)
// 新增合同按钮是否显示
const [contractSearchBox, setContractSearchBox] = useState(false)
// 优惠券遮罩层是否显示
const [coupon, setCoupon] = useState(false)
// 获取优惠券弹出层是否显示
const [getCouponModal, setGetCouponModal] = useState(false)
// 优惠券数组
const [couponArray, setCouponArray] = useState<any>([])
//优惠券id
const [couponId, setCouponId] = useState('')
// 优惠券图片 const imgSrc = `${Axios.defaults?.baseURL}/route/file/v2/download/true/${data.data.couponId}`;
const [cpuponImg, setCouponImg] = useState('')
// 获取是否有优惠券信息
const getCoupon = () => {
get({
messageApi,
url: `/api/coupon/list-can-claim`,
// url: `/api/proj/refund/apply/listpage?applyStatus=${state.type}`,
config: {
params: {
}
},
onBefore() {
},
onSuccess(data: any) {
// console.log(data.data);
// if (data.data.couponId) {
// setCouponId(data.data.couponId)
// setCouponImg(data.data.logo)
// setCoupon(true)
// }
setCouponArray(data.data)
if (data.data.length == 1) {
setCouponId((data.data)[0].couponId)
setCouponImg((data.data)[0].logo)
setCoupon(true)
}
if (data.data.length > 1) {
setGetCouponModal(true)
}
},
onFinally() {
},
})
}
// 领取优惠券单张
const receiveCoupon = () => {
post<any>({
messageApi,
url: `/api/coupon/user/save`,
body: {
couponId: couponId
},
onBefore() {
},
onSuccess() {
messageApi.success('领取成功')
setTimeout(() => {
setCoupon(false)
// getCoupon()
}, 500)
},
onFinally() {
}
})
}
// 领取优惠券(多张)
const receiveCoupons = (id: string) => {
post<any>({
messageApi,
url: `/api/coupon/user/save`,
body: {
couponId: id
},
onBefore() {
},
onSuccess() {
messageApi.success('领取成功')
//更新列表
get({
messageApi,
url: `/api/coupon/list-can-claim`,
// url: `/api/proj/refund/apply/listpage?applyStatus=${state.type}`,
config: {
params: {
}
},
onBefore() {
},
onSuccess(data: any) {
setCouponArray(data.data)
if (data.data.length == 0) {
setTimeout(() => {
setGetCouponModal(false)
// getCoupon()
}, 500)
}
},
onFinally() {
},
})
},
onFinally() {
}
})
}
// const [languageList, setLanguageList] = useState<any>([]) // 开发者语言列表
// 获取语言列表
// const getLanguageListDate = async () => {
// try {
// const res: any = await getLanguageList()
// // console.log('语言列表',res);
// setLanguageList(res.map((item: any) => {
// return {
// value: item.dataId,
// label: item.dataName,
// }
// }))
// } catch (error: any) {
// if (error.response) {
// const data = error.response.data;
// messageApi.open({
// type: 'error',
// content: data.msg ? data.msg : `${data.path}(${data.status})`,
// });
// } else {
// console.error(error)
// }
// }
// }
// const [softTypeList, setSoftTypeList] = useState<any>([]) // 软著类型列表
// 获取软著类型列表
// const getSoftTypeListDate = async () => {
// try {
// const res: any = await getSoftTypeList()
// // console.log('软著类型列表', res);
// setSoftTypeList(res.map((item: any) => {
// return {
// value: item.dataId,
// label: item.dataName,
// }
// }))
// } catch (error: any) {
// if (error.response) {
// const data = error.response.data;
// messageApi.open({
// type: 'error',
// content: data.msg ? data.msg : `${data.path}(${data.status})`,
// });
// } else {
// console.error(error)
// }
// }
// }
// app电子软著数组
// const appGoodsArray = [
// { id: '1', title: '10个工作日下证', price: '500', back: 'black' },
// { id: '2', title: '3个工作日下证', price: '900', back: 'blue' },
// { id: '3', title: '1个工作日下证', price: '2599', back: 'black' },
// { id: '4', title: '当天下证', price: '3699', back: 'black' },
// ]
// 商标数组
const trademarkArray = [
{
id: '1', title: '智能申请注册', nowprice: '270',
old: true, //是否显示原价
oldprice: '318', //原价
cheap: true,//特价
text: '0服务费针对有一定商标申请经验并能自主评估风险的用户',
left: '性价比', right: '高',
textArray: [
'自助办理,性价比高',
'自助查询,排查风险',
'人工严审,提升受理率'
],
serve: false, //专家咨询
num: 1 // 限购
},
{
id: '2', title: '专家辅助注册', nowprice: '499', cheap: false,
old: false,
oldprice: '',
text: '流程专业代办,适用于商标风险评估、类别选择无经验的新用户',
left: '成功率', right: '高',
textArray: [
'专家一对一,全流程代办',
'分析风险,优化注册方案',
'分析风险,优化注册方案'
],
serve: true,
num: 0
},
{
id: '3', title: '至尊无忧注册', nowprice: '599', cheap: false,
old: false,
oldprice: '',
text: '专家评估提高通过率,注册失败,可赔付全款',
left: '类型', right: '指定类目',
textArray: [
'你注册,我投保',
'每件商标都有保单',
'指定类目驳回,赔付全款'
],
serve: true,
num: 0
},
]
const [appGoodsId, setAppGoodsId] = useState('') // 选择的商品id
useEffect(() => {
// const nowname = sessionStorage.getItem('now')
if (location.pathname == '/') {
// setCoupon(true)
getCoupon()
}
if (location.pathname.includes('/home')) {
// setCoupon(true)
getCoupon()
setNow('首页 / 项目')
// setPathArray([{ title: '首页' }])
setShowSearchBox(true)
// setClickBelongpeople(true)
setRrefunSearchBox(false)
setContractSearchBox(false)
setCorrectionSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
} else if (location.pathname.includes('/proj-create')) {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
setNow('创建项目')
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '创建项目' }])
// /config-mod-list /config-menu-list /config-mod-show
} else if (location.pathname.includes('/proj-edit') && !location.pathname.includes('/config-mod-show') && !location.pathname.includes('/config-mod-edit') && !location.pathname.includes('/step') && !location.pathname.includes('/config-loginpage') && !location.pathname.includes('/config-mod-save') && !location.pathname.includes('/config-mod-list') && !location.pathname.includes('/config-menu-list')) {
setNow(`${projStatus}项目 / ${projName}`)
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setEditname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '编辑项目' }])
} else if (location.pathname.includes('/proj-new')) {
setNow(`创建项目`)
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: '新建项目' }])
} else if (location.pathname.includes('/proj-efree')) {
setNow(`${projStatus}项目 / ${projName}`)
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '编辑项目' }])
} else if (location.pathname.includes('/proj-eall')) {
setNow(`${projStatus}项目 / ${projName}`)
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setNewname(location.pathname)
// setPathArray([{ title: <Link to={'/home'}>首页 </Link> }, { title: '编辑项目' }])
} else if (location.pathname.includes('/proj-edit/step1')) {
setNow('标题简介')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
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: '标题简介' }])
} else if (location.pathname.includes('/proj-edit/step2')) {
setNow('标题简介')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
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: '基本信息' }])
} else if (location.pathname.includes('/proj-edit/config-loginpage')) {
setNow('登录界面设置')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
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: '登录界面设置' }])
} else if (location.pathname.includes('/proj-edit/config-mod-list')) {
setNow('系统菜单管理')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
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: '系统菜单管理' }])
} else if (location.pathname.includes('/proj-edit/config-menu-list')) {
setNow('系统菜单顺序')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
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: '系统菜单顺序' }])
} else if (location.pathname.includes('/step3')) {
setNow('软件功能特点')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
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: '软件功能特点' }])
} else if (location.pathname.includes('/proj-edit/config-mod-save')) {
setNow('添加菜单')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
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')) {
setNow('编辑菜单')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
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
} else if (location.pathname.includes('/proj-edit/config-mod-show')) {
setNow('查看菜单')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setSellSearchBox(false)
setContractSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
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
} else if (location.pathname.includes('/product-release')) {
setNow('首页 / 商品发布')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(true)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setPathArray([{ title: '首页' }])
// /config-mod-edit /product-release /transaction-order
} else if (location.pathname.includes('/transaction-order')) {
setNow('首页 / 交易订单')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(true)
setCopyrightSearchBox(false)
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setPathArray([{ title: '首页' }])
// /config-mod-edit /product-release /transaction-order
} else if (location.pathname.includes('/copyright-goods')) {
setNow('首页 / 著作权商品')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(true)
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setPathArray([{ title: '首页' }])
// /config-mod-edit /product-release /transaction-order
} else if (location.pathname.includes('/trading-goods')) {
setNow('首页 / 交易商品')
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
setTradingSearchBox(true)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
// setPathArray([{ title: '首页' }])
// /config-mod-edit /product-release /transaction-order
} else if (location.pathname.includes('/refun')) {
setShowSearchBox(false)
setNow('首页 / 退款')
// setClickBelongpeople(false)
setRrefunSearchBox(true)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
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: '软件功能特点' }])
} else if (location.pathname.includes('/correction')) {
setShowSearchBox(false)
setNow('首页 / 补正')
// setClickBelongpeople(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(true)
setContractSearchBox(false)
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
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: '软件功能特点' }])
} else if (location.pathname.includes('/contract')) {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(true)
setNow('首页 / 合同下载')
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
} else if (location.pathname.includes('/app-electron')) {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setNow('首页 / 电子软著APP')
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
setTradingSearchBox(false)
setAppSearchBox(true)
setTrademarkBox(false)
setReplaceSearchBox(false)
} else if (location.pathname.includes('/app-edit')) {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setNow('申请电子软著')
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
setTradingSearchBox(false)
setAppSearchBox(false)
setTrademarkBox(false)
setReplaceSearchBox(false)
}
else if (location.pathname.includes('/trademark-mall')) {
setShowSearchBox(false)
setRrefunSearchBox(false)
setCorrectionSearchBox(false)
setContractSearchBox(false)
setNow('首页 / 商标商城')
setSellSearchBox(false)
setSellOrderSearchBox(false)
setCopyrightSearchBox(false)
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])
useEffect(() => {
// nav('/home')
// sessionStorage.setItem('pathArray', JSON.stringify([{ title: <Link to={'/home'}>首页</Link> }]));
// sessionStorage.setItem('now', '首页');
if (searchParams.get('type') == 'agent') {
dispatch({
type: IndexListDataType.AGENT,
value: 'ALL',
})
}
// getProjOwnerList()
getCorTag()
getTag()
getremindTag()
// console.log(belongArray);
// getLanguageListDate()
// getSoftTypeListDate()
getAppGoodsList()
}, []);
useEffect(() => {
// loactionStorage里的activeMenu
if (location.pathname == '/') {
nav('/home', {
state: {
keyword: keywords,
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId,
// tagNot
}
})
}
if (location.pathname.includes('/home')) {
nav('/home', {
state: {
keyword: keywords,
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId,
// tagNot
}
})
}
if (location.pathname.includes('/refun')) {
nav('/refun', {
state: {
keywords: refunKeywords,
applyStatus: applyStatus,
authorId: authorId,
}
})
}
if (location.pathname.includes('/correction')) {
nav('/correction', {
state: {
keywords: correctionKeywords,
correctionNumType: correctionNumType,
correctionType: correctionType,
applyStatus: correctionApplyStatus,
authorId: authorId,
tagCor: tagCor,
}
})
}
}, [type, chargeAdditionals, keywords, tagDataId, projRemindId, payStatus, authorId, refunKeywords, applyStatus, correctionKeywords, correctionNumType, correctionType, correctionApplyStatus, tagCor]);
// const [menuName,setMenuName] = useState<string | null>('')
// useEffect(()=>{
// setMenuName( getMenuActive())
// },[getMenuActive()])
const handleSearch = (value: string) => {
// console.log(value);
setKeywords(value)
nav('/home', {
state: {
keyword: value,
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId,
// tagNot
}
})
}
const handleChange = (e: any) => {
setNowKeyWord(e.target.value)
// console.log(e.target.value);
if (e.target.value == '') {
setKeywords('')
nav('/home', {
state: {
keyword: '',
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId,
// tagNot
}
})
}
}
// 退款状态
// 退款关键字搜索
const refunhandleSearch = (value: string) => {
// console.log(value);
setrefunKeywords(value)
nav('/refun', {
state: {
keywords: value,
applyStatus: applyStatus,
authorId: authorId,
}
})
}
const refunhandleChange = (e: any) => {
setnewRefunValue(e.target.value)
// console.log(e.target.value);
if (e.target.value == '') {
setrefunKeywords('')
nav('/refun', {
state: {
keywords: '',
applyStatus: applyStatus,
authorId: authorId,
}
})
}
}
// 补正关键字搜索
const correctionhandleSearch = (value: string) => {
// console.log(value);
setcorrectionKeywords(value)
nav('/correction', {
state: {
keywords: value,
correctionNumType: correctionNumType,
correctionType: correctionType,
applyStatus: correctionApplyStatus,
authorId: authorId,
tagCor: tagCor,
}
})
}
const correctionhandleChange = (e: any) => {
setnewCorrectionValue(e.target.value)
// console.log(e.target.value);
if (e.target.value == '') {
setcorrectionKeywords('')
nav('/correction', {
state: {
keywords: '',
correctionNumType: correctionNumType,
correctionType: correctionType,
applyStatus: correctionApplyStatus,
authorId: authorId,
tagCor: tagCor,
}
})
}
}
return (
<>
{/* <Breadcrumb
items={[
{title: <Link to={'/'}>首页</Link>}
]}
/> */}
{contextHolder}
<IndexListContext.Provider value={listData} >
<IndexListDispatchContext.Provider value={dispatch}>
<div className="index">
<div className='coupon-mask'></div>
<div className='leftbox'>
{/* <div style={{display:'flex'}}> */}
{/* <div style={{height:1000,width:6,background:'red',marginRight:-6,zIndex:99}}></div> */}
<div className="left" >
<div className='mediaBox' style={{
// height: '15px', width: '230px',
background: 'white'
}}></div>
<MenuWithTopButton
button={projMenu.button}
list={projMenu.list}
handleListItem={projMenu.handleListItem}
keywords={keywords}
chargeAdditionals={chargeAdditionals ? chargeAdditionals : ""}
tagDataId={tagDataId ? tagDataId : ""}
authorId={authorId ? authorId : ""}
payStatus={payStatus ? payStatus : ''}
// 退款
refunKeywords={refunKeywords}
applyStatus={applyStatus ? applyStatus : ''}
type={type ? type : ""}
// 补正
correctionKeywords={correctionKeywords ? correctionKeywords : ''}
correctionNumType={correctionNumType ? correctionNumType : ''}
correctionType={correctionType ? correctionType : ''}
correctionApplyStatus={correctionApplyStatus ? correctionApplyStatus : ''}
tagCor={tagCor ? tagCor : ''}
// enableBelongpeople = {()=>{setClickBelongpeople(true)}}
/>
{/* <div className='belongPeopleMenu'>
<div className='belongPeopleMenu-title'>
<MenuFoldOutlined style={{ marginLeft: 10, marginRight: 10 }} />产权所属者
</div>
<div style={{ display: belongArray.length > 0 ? 'block' : 'none' }}>
<div className='belongPeopleMenu-box'>
{
currentPageData.map((item: any) => {
return (
<div className='belongpeopleName' key={item.projOwnerId} onClick={() => {
if (authorId == item.projOwnerId) {
setauthorId(null)
} else {
setauthorId(item.projOwnerId)
}
}}
style={{ background: authorId == item.projOwnerId ? '#FF9F08' : '', color: authorId == item.projOwnerId ? '#FFF' : '' }}
title={item.name} // 添加 title 属性以显示完整文本
>
{item.name}
</div>
)
})
}
</div>
<div className='belong-pagination'>
<Pagination
showSizeChanger={false}
current={currentPage}
total={totalItems}
pageSize={itemsPerPage}
onChange={handlePageChange} // 页码改变时的回调
className="custom-pagination"
/>
</div>
</div>
<div style={{ display: belongArray.length > 0 ? 'none' : 'block', height: 230 }}>
<div style={{ width: 230, height: 230, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Empty
description="暂无数据"
/>
</div>
</div>
</div> */}
{/* <MenuTreeWithTopButton /> */}
{/* <MenuWithBottomButtom
button={agentMenu.button}
list={agentMenu.list}
handleListItem={agentMenu.handleListItem}
/> */}
{/* {THEME == 'mzw' ? (
<>
<div style={{
background: getMenuActive() == 'APP' ? 'linear-gradient(90deg, #FF9F08 0%, #FF7331 100%)' : ' var(--color-menuback)',
borderTop: '1px solid var(--color-menuborder)',
height: 56,
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
// justifyContent: 'center',
color: getMenuActive() == 'APP' ? '#FFF' : 'var(--color-menuhead)',
fontSize: 18
}}
onClick={() => {
projMenu.list.forEach(item => item.active = false);
sellMenu.list.forEach(item => item.active = false);
buyMenu.list.forEach(item => item.active = false);
// 可按需添加其他菜单的处理
// 更新菜单状态
setProjMenu({ ...projMenu });
setSellMenu({ ...sellMenu });
setBuyMenu({ ...buyMenu });
setMenuActive('APP')
nav('/app-electron')
// 设置 APP 电子软著为选中状态
// setIsAppSelected(true);
}}
>
<img src={getMenuActive() == 'APP' ? appnew : app} width={21} height={23} alt=""
style={{ marginLeft: 20, marginRight: 9 }}
/>
<div>电子软著APP</div>
</div>
<div style={{
background: getMenuActive() == 'TRADEMARK' ? 'linear-gradient(90deg, #FF9F08 0%, #FF7331 100%)' : ' var(--color-menuback)',
borderTop: '1px solid var(--color-menuborder)',
// borderBottom: '1px solid var(--color-menuborder)',
height: 56,
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
// justifyContent: 'center',
color: getMenuActive() == 'TRADEMARK' ? '#FFF' : 'var(--color-menuhead)',
fontSize: 18
}}
onClick={() => {
projMenu.list.forEach(item => item.active = false);
sellMenu.list.forEach(item => item.active = false);
buyMenu.list.forEach(item => item.active = false);
// 可按需添加其他菜单的处理
// 更新菜单状态
setProjMenu({ ...projMenu });
setSellMenu({ ...sellMenu });
setBuyMenu({ ...buyMenu });
setMenuActive('TRADEMARK')
nav('/trademark-mall')
// 设置 APP 电子软著为选中状态
// setIsAppSelected(true);
}}
>
<img src={getMenuActive() == 'TRADEMARK' ? tranew : tra} width={21} height={21} alt=""
style={{ marginLeft: 20, marginRight: 9, marginTop: 3 }}
/>
<div>商标商城</div>
</div>
</>
) : (
<></>
)} */}
{THEME == 'mzw' ? (
<MenuWithBottomButtom
button={sellMenu.button}
list={sellMenu.list}
handleListItem={sellMenu.handleListItem}
sellKeywords={sellKeywords}
sellBelongType={sellBelongType}
sellDate={sellDate}
language={language}
sellBoxtype={sellBoxtype}
sellStatrtTime={sellStatrtTime}
sellEndTime={sellEndTime}
sellOrderStatus={sellOrderStatus}
sellOrderKeywords={sellOrderKeywords}
/>
) : (
<></>
)}
{/* <MenuWithBottomButtom
button={buyMenu.button}
list={buyMenu.list}
handleListItem={buyMenu.handleListItem}
copyrightKeywords={copyrightKeywords}
minPrice={minPrice}
maxPrice={maxPrice}
sort={sort}
copyrightDate={copyrightDate}
copyrightLanguage={copyrightLanguage}
copyrightType={copyrightType}
tradingKeywords={tradingKeywords}
tradingStartTime={tradingStartTime}
tradingEndTime={tradingEndTime}
tradingStatus={tradingStatus}
/> */}
{/* <MenuWithTopButton
button={refundMenu.button}
list={refundMenu.list}
handleListItem={refundMenu.handleListItem}
/> */}
{/* <MenuWithTopButton
button={correctionMenu.button}
list={correctionMenu.list}
handleListItem={correctionMenu.handleListItem}
/> */}
</div>
{/* </div> */}
</div>
<div className="right">
<div>
<div className="top">
{/* 标签 */}
{/* {renderStatus()} */}
<div className='gps'>
<img src={gpsImg} alt="" />
<div className='gps-now'>{now}</div>
</div>
<div className='mediaLine'>
<div className='line' style={{
display: showSearchBox ? 'block' : 'none',
}} ></div>
</div>
<div style={{ display: showSearchBox ? 'block' : 'none' }}>
<div
className='mediaSearch'
style={{
display: 'flex',
alignItems: 'center',
minHeight: 62,
// flexWrap: 'wrap',
padding: '10px 0',
boxSizing: 'border-box',
// background:'red',
// width:890
}}>
<div
style={{
width: 1,
height: 23,
marginLeft: 33,
marginRight: 31,
display: showSearchBox ? 'none' : 'block'
}}
></div>
<Search placeholder="输入项目名称"
value={nowKeyword}
onSearch={handleSearch}
onChange={handleChange}
className='searchInputmedia'
style={{
// maxWidth: '200px',
width: '170px',
height: '31px',
display: showSearchBox ? 'block' : 'none'
}}
allowClear
/>
<Select
value={type}
allowClear
style={{ height: '31px', width: '110px', marginLeft: 5, display: showSearchBox ? 'block' : 'none' }}
onChange={(value: string) => {
setType(value)
nav('/home', {
state: {
keyword: keywords,
type: value,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId,
// tagNot
}
})
}}
options={[
{ value: 'FREE', label: '免费试用' },
{ value: 'MATERIAL', label: '写材料' },
{ value: 'ALL', label: '全托管' },
]}
placeholder='选择类型'
/>
<Select
allowClear
value={chargeAdditionals}
style={{ height: '31px', width: '130px', marginLeft: 5, display: showSearchBox ? 'block' : 'none' }}
onChange={(value: string) => {
// console.log(`selected ${value}`);
setchargeAdditionals(value)
// alert(`selected ${value}`)
// lyp
nav('/home', {
state: {
keyword: keywords,
type: type,
chargeAdditionals: value,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId,
// tagNot
}
})
}}
options={[
// { value: '', label: '全部项目' },
{ value: 'PKG', label: '安装包' },
{ value: 'VIDEO_DEMO', label: '演示视频' },
{ value: 'URGENT', label: '加急' },
]}
// defaultValue=""
placeholder={'选择拓展收费'}
/>
<Select
allowClear
value={tagDataId}
style={{ height: '31px', width: '130px', marginLeft: 5, display: showSearchBox ? 'block' : 'none' }}
onChange={(value: string) => {
// console.log(`selected ${value}`);
// const [part1, part2] = value.split(':');
// console.log('part1:', part1);
// console.log('part2:', part2);
// if (part1 == 'TAG_NOT') {
// setTagNot(true)
// }
settagDataId(value)
// alert(`selected ${value}`)
// lyp
nav('/home', {
state: {
keyword: keywords,
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: value,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId,
// tagNot:part2 == 'TAG_NOT'?true:false
}
})
}}
options={
tagArray
}
placeholder={'选择标签'}
/>
<div style={{
display: remindTagArray.length > 0 ? 'block' : 'none',
}}>
<Select
allowClear
value={projRemindId}
style={{ height: '31px', width: '130px', marginLeft: 5, display: showSearchBox ? 'block' : 'none' }}
onChange={(value: string) => {
// console.log(`selected ${value}`);
setprojRemindId(value)
// alert(`selected ${value}`)
// lyp
nav('/home', {
state: {
keyword: keywords,
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: value,
// tagNot
}
})
}}
options={
remindTagArray
}
placeholder={'选择提醒'}
/>
</div>
<Select
allowClear
value={payStatus}
style={{ height: '31px', width: '130px', marginLeft: 5, display: showSearchBox ? 'block' : 'none' }}
onChange={(value: string) => {
setpayStatus(value)
nav('/home', {
state: {
keyword: keywords,
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: value,
projRemindId: projRemindId,
// tagNot
}
})
}}
options={[
{ value: 'UNPAID', label: '未付款' },
{ value: 'PAID', label: '已付款' },
{ value: 'ARREARS', label: '欠费' },
{ value: 'FULL_REFUND', label: '全额退费' },
{ value: 'CORRECTION1_REFUND', label: '补正1次退款' },
{ value: 'CORRECTION2_REFUND', label: '补正2次退款' },
]}
placeholder={'选择付款类型'}
/>
{/* <Select
allowClear
value={authorId}
style={{ height: '31px', width: '150px', marginLeft: 5, display: showSearchBox ? 'block' : 'none' }}
onChange={(value: string) => {
setauthorId(value)
nav('/home', {
state: {
keyword: keywords,
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: value,
payStatus: payStatus,
projRemindId: projRemindId,
// tagNot
}
})
}}
options={belongArrayList}
placeholder={'选择所属者'}
/> */}
<div style={{
position: 'relative',
}}>
<Input placeholder='选择所属者'
value={authorName}
style={{
height: '31px', width: '110px', marginLeft: 5, display: showSearchBox ? 'block' : 'none',
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('/home', {
state: {
keyword: keywords,
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: '',
payStatus: payStatus,
projRemindId: projRemindId,
// tagNot
}
})
}}
/>
</div>
<Button onClick={() => {
init()
}} style={{ marginLeft: 5, display: showSearchBox ? 'block' : 'none', height: 31 }}
// type="primary"
icon={<ClearOutlined />}>
</Button>
</div>
</div>
<div style={{ display: refunSearchBox ? 'block' : 'none' }}>
<div
className='mediaSearch'
style={{
display: 'flex',
alignItems: 'center'
}}>
<div className='mediaLine'>
<div className='line' style={{
}} ></div>
</div>
<Button type="primary" onClick={() => {
setRefunModal(true)
refunInit()
// dispath({
// type: 'newRefun',
// val: true
// })
}}
style={{ background: 'var(--color-searchbtn)' }}
>
退
</Button>
<Search placeholder="输入项目名称"
value={newRefunValue}
onSearch={refunhandleSearch}
onChange={refunhandleChange}
style={{
width: '200px',
height: '31px',
marginLeft: 5
}}
allowClear
/>
<Select
value={applyStatus}
style={{ height: '31px', width: '150px', marginLeft: 5 }}
onChange={(value: string) => {
setapplyStatus(value)
nav('/refun', {
state: {
keywords: refunKeywords,
applyStatus: value,
authorId: authorId,
}
})
}}
options={[
// { value: '', label: '全部项目' },
{ value: 'PENDING', label: '待审核' },
{ value: 'APPROVED', label: '已通过' },
{ value: 'REJECTED', label: '未通过' },
{ value: 'CANCELED', label: '已取消' },
]}
// defaultValue=""
placeholder={'选择状态'}
allowClear
/>
{/* <Select
allowClear
value={authorId}
style={{ height: '31px', width: '150px', marginLeft: 5}}
onChange={(value: string) => {
setauthorId(value)
nav('/refun', {
state: {
keywords: refunKeywords,
applyStatus: applyStatus,
authorId: value,
}
})
}}
options={belongArrayList}
placeholder={'选择所属者'}
/> */}
<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('/refun', {
state: {
keywords: refunKeywords,
applyStatus: applyStatus,
authorId: '',
}
})
}}
/>
</div>
<Button onClick={() => {
refunInit()
}} style={{ marginLeft: 5, height: 31 }}
// type="primary"
icon={<ClearOutlined />}>
</Button>
</div>
</div>
<div style={{ display: correctionSearchBox ? 'block' : 'none' }}>
<div className='mediaSearch' style={{
display: 'flex',
alignItems: 'center'
}}>
<div className='mediaLine'>
<div className='line' style={{
}} ></div>
</div>
<Button type="primary" onClick={() => {
setCorrectionModal(true)
correctionInit()
// dispath({
// type: 'newCorrection',
// val: true
// })
}}
style={{ background: 'var(--color-searchbtn)' }}
>
</Button>
<Search placeholder="输入项目名称"
value={newCorrectionValue}
onSearch={correctionhandleSearch}
onChange={correctionhandleChange}
style={{
width: '160px',
height: '31px',
marginLeft: 5
}}
allowClear
/>
<Select
value={correctionNumType}
style={{ height: '31px', width: '110px', marginLeft: 5 }}
onChange={(value: string) => {
setcorrectionNumType(value)
nav('/correction', {
state: {
keywords: correctionKeywords,
correctionNumType: value,
correctionType: correctionType,
applyStatus: correctionApplyStatus,
authorId: authorId,
tagCor: tagCor,
}
})
}}
options={[
// { value: '', label: '全部项目' },
{ value: 'CORRECTION1', label: '一次补正' },
{ value: 'CORRECTION2', label: '二次补正' },
]}
// defaultValue=""
placeholder={'选择类型'}
allowClear
/>
<Select
style={{ height: '31px', width: '130px', marginLeft: 5 }}
value={correctionType}
onChange={(value: string) => {
setcorrectionType(value)
nav('/correction', {
state: {
keywords: correctionKeywords,
correctionNumType: correctionNumType,
correctionType: value,
applyStatus: correctionApplyStatus,
authorId: authorId,
tagCor: tagCor,
}
})
}}
allowClear
options={[
// { value: '', label: '全部项目' },
{ value: 'CODE', label: '代码' },
{ value: 'MANUAL', label: '操作手册' },
{ value: 'ALL', label: '全部补正' },
]}
// defaultValue=""
placeholder={'选择补正种类'}
/>
<Select
value={correctionApplyStatus}
style={{ height: '31px', width: '120px', marginLeft: 5 }}
onChange={(value: string) => {
setcorrectionApplyStatus(value)
nav('/correction', {
state: {
keywords: correctionKeywords,
correctionNumType: correctionNumType,
correctionType: correctionType,
applyStatus: value,
authorId: authorId,
tagCor: tagCor,
}
})
}}
options={[
// { value: '', label: '全部项目' },
{ value: 'PENDING', label: '待审核' },
{ value: 'APPROVED', label: '已通过' },
{ value: 'REJECTED', label: '未通过' },
{ value: 'CANCELED', label: '已取消' },
]}
// defaultValue=""
placeholder={'选择状态'}
allowClear
/>
<Select
value={tagCor}
style={{ height: '31px', width: '120px', marginLeft: 5 }}
onChange={(value: string) => {
setTagCor(value)
nav('/correction', {
state: {
keywords: correctionKeywords,
correctionNumType: correctionNumType,
correctionType: correctionType,
applyStatus: applyStatus,
authorId: authorId,
tagCor: value,
}
})
}}
options={
tagCorArray
}
// defaultValue=""
placeholder={'选择标签'}
allowClear
/>
{/* <Select
allowClear
value={authorId}
style={{ height: '31px', width: '150px', marginLeft: 5}}
onChange={(value: string) => {
setauthorId(value)
nav('/correction', {
state: {
keywords: correctionKeywords,
correctionNumType: correctionNumType,
correctionType: correctionType,
applyStatus: applyStatus,
authorId: value,
tagCor: tagCor,
// tagNot
}
})
}}
options={belongArrayList}
placeholder={'选择所属者'}
/> */}
<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('/correction', {
state: {
keywords: correctionKeywords,
correctionNumType: correctionNumType,
correctionType: correctionType,
applyStatus: applyStatus,
authorId: '',
tagCor: tagCor,
}
})
}}
/>
</div>
<Button onClick={() => {
correctionInit()
}} style={{ marginLeft: 5, height: 31 }}
// type="primary"
icon={<ClearOutlined />}>
</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',
alignItems: 'center'
}}>
<div className='mediaLine'>
<div className='line' style={{
}} ></div>
</div>
<Button type="primary" onClick={() => {
setContractModal(true)
}}
style={{ background: 'var(--color-searchbtn)' }}
>
</Button>
</div>
</div>
<div style={{ display: sellSearchBox ? 'block' : 'none', }}>
<div className='mediaSearch' style={{
display: 'flex',
alignItems: 'center',
}}>
<div className='mediaLine'>
<div className='line' style={{
}} ></div>
</div>
<Button type="primary"
style={{ background: 'var(--color-searchbtn)' }}
onClick={() => {
setSellModal(true)
}}
></Button>
<Search placeholder="输入项目名称"
value={sellNewKeywords}
onSearch={sellKeyWordshandleSearch}
onChange={sellKeyWordshandleChange}
className='searchInputmedia'
style={{
// maxWidth: '200px',
width: '160px',
height: '31px',
marginLeft: 5
}}
allowClear
/>
<Select
// defaultValue="lucy"
allowClear
placeholder='请选择所属者类型'
style={{ width: 170, height: 31, marginLeft: 5 }}
onChange={sellBelongTypeChange}
options={[
{ value: '1', label: '自然人' },
{ value: '2', label: '法人' },
{ value: '3', label: '非法人组织或其他' },
]}
value={sellBelongType}
/>
<DatePicker placeholder="软著获取时间"
style={{
width: 140, height: 31, marginLeft: 5,
display: 'none'
}}
locale={locale}
onChange={sellDateonChange}
value={sellDate}
allowClear
picker="year" // 设置只选择年份
/>
<Select
allowClear
// defaultValue="lucy"
placeholder='选择开发语言'
style={{
width: 150, height: 31, marginLeft: 5,
display: 'none'
}}
onChange={selectLanguage}
// options={languageList}
options={[]}
value={language}
/>
<Select
allowClear
// defaultValue="lucy"
placeholder='选择软著类型'
mode="multiple"
style={{
width: 130, height: 31, marginLeft: 5,
display: 'none'
}}
onChange={selectType}
// options={softTypeList}
options={[]}
value={sellBoxtype}
/>
<Button
style={{
marginLeft: 5, height: 31
}}
icon={<ClearOutlined />}
onClick={() => {
sellInit()
}}
>
</Button>
</div>
</div>
<div style={{ display: sellOrderSearchBox ? 'block' : 'none', }}>
<div className='mediaSearch' style={{
display: 'flex',
alignItems: 'center',
}}>
<div className='mediaLine'>
<div className='line' style={{
}} ></div>
</div>
<Search placeholder="输入项目名称"
value={sellOrderNewKeywords}
onSearch={sellOrderKeyWordshandleSearch}
onChange={sellOrderKeyWordshandleChange}
className='searchInputmedia'
style={{
// maxWidth: '200px',
width: '170px',
height: '31px',
}}
allowClear
/>
<DatePicker placeholder="开始时间"
style={{
width: '130px',
height: '31px', marginLeft: 5
}}
format={dateFormat}
locale={locale}
onChange={sellStratTimeChange}
value={sellStatrtTime}
allowClear
/>
<DatePicker placeholder="结束时间"
style={{
width: '130px',
height: '31px', marginLeft: 5
}}
format={dateFormat}
locale={locale}
onChange={sellEndTimeChange}
value={sellEndTime}
allowClear
/>
<Select
// defaultValue="lucy"
placeholder='选择订单状态'
style={{ width: 130, height: 31, marginLeft: 5 }}
onChange={sellOrderStatusChange}
options={[
{ value: '0', label: '订单已取消' },
{ value: '1', label: '买家待付款' },
{ value: '2', label: '待填写资料' },
{ value: '3', label: '过户进行中' },
{ value: '4', label: '过户已完成' },
// { value: '5', label: '买家已评价' },
// { value: '6', label: '发票已开具' },
]}
value={sellOrderStatus}
allowClear
/>
<Button
style={{
marginLeft: 5, height: 31
}}
icon={<ClearOutlined />}
onClick={() => {
sellOrderInit()
}}
>
</Button>
</div>
</div>
<div style={{ display: copyrightSearchBox ? 'block' : 'none', }}>
<div className='mediaSearch' style={{
display: 'flex',
alignItems: 'center',
}}>
<div className='mediaLine'>
<div className='line' style={{
}} ></div>
</div>
<Search placeholder="输入项目名称"
value={copyrightNewKeywords}
onSearch={copyrightKeyWordshandleSearch}
onChange={copyrightKeyWordshandleChange}
className='searchInputmedia'
style={{
// maxWidth: '200px',
width: '170px',
height: '31px',
}}
allowClear
/>
<InputNumber placeholder="最低价格" min={0}
style={{
width: 100,
height: 31,
marginLeft: 5,
}}
value={minPrice}
onChange={minPriceChange}
/>
<div style={{
marginLeft: 5,
}}>
</div>
<InputNumber placeholder="最高价格" min={0} style={{
width: 100,
// height: 36,
height: 31,
marginLeft: 5,
}}
value={maxPrice}
onChange={maxPriceChange}
/>
<DatePicker placeholder="软著获取时间"
allowClear
style={{
width: 130, height: 31,
marginLeft: 5,
display: 'none'
}}
// format={dateFormat}
locale={locale}
onChange={copyrightDateChange}
value={copyrightDate}
picker="year" // 设置只选择年份
/>
<Select
// defaultValue="lucy"
placeholder='价格排序'
style={{
width: 100, height: 31,
marginLeft: 5,
}}
onChange={sortChange}
options={[
{ value: 'DESC', label: '从高到低' },
{ value: 'ASC', label: '从低到高' },
]}
value={sort}
allowClear
/>
<Select
allowClear
// defaultValue="lucy"
placeholder='选择开发语言'
style={{
width: 130, height: 31,
marginLeft: 5,
display: 'none'
}}
onChange={copyrightLanguageChange}
// options={languageList}
options={[]}
value={copyrightLanguage}
/>
<Select
allowClear
// defaultValue="lucy"
placeholder='选择软著类型'
mode="multiple"
style={{
width: 130, height: 31,
marginLeft: 5,
display: 'none'
}}
onChange={copyrightTypeChange}
// options={softTypeList}
options={[]}
value={copyrightType}
/>
<Button
icon={<img src={specialPrice ? noFirImg : firImg} style={{ width: 15, height: 18 }} />}
style={{
background: specialPrice ? '#FF9F08' : '#FFF6EF',
color: specialPrice ? 'white' : '#FF9F00 ',
marginLeft: 5, height: 31,
border: '1px solid #FF9F00 ',
}}
onClick={() => {
// 特价标识
setSpecialPrice(!specialPrice)
}}
>
</Button>
<Button
style={{
marginLeft: 5, height: 31
}}
icon={<ClearOutlined />}
onClick={() => {
copyrightInit()
}}
>
</Button>
</div>
</div>
<div style={{ display: tradingSearchBox ? 'block' : 'none', }}>
<div className='mediaSearch' style={{
display: 'flex',
alignItems: 'center',
}}>
<div className='mediaLine'>
<div className='line' style={{
}} ></div>
</div>
<Search placeholder="输入项目名称"
value={tradingNewKeywords}
onSearch={tradingKeyWordshandleSearch}
onChange={tradingKeyWordshandleChange}
className='searchInputmedia'
style={{
// maxWidth: '200px',
width: '170px',
height: '31px',
}}
allowClear
/>
<DatePicker placeholder="开始时间"
style={{
width: '130px',
height: '31px', marginLeft: 5,
}}
format={dateFormat}
locale={locale}
onChange={tradingStartTimeChange}
value={tradingStartTime}
allowClear
/>
<DatePicker placeholder="结束时间"
style={{
width: '130px',
height: '31px', marginLeft: 5,
}}
format={dateFormat}
locale={locale}
onChange={tradingEndTimeChange}
value={tradingEndTime}
allowClear
/>
<Select
placeholder='选择订单状态'
style={{
width: '130px',
height: '31px', marginLeft: 5,
}}
onChange={tradingOrderStatusChange}
options={[
{ value: '0', label: '订单已取消' },
{ value: '1', label: '买家待付款' },
{ value: '2', label: '待填写资料' },
{ value: '3', label: '过户进行中' },
{ value: '4', label: '过户已完成' },
// { value: '5', label: '买家已评价' },
// { value: '6', label: '发票已开具' },
]}
value={tradingStatus}
allowClear
/>
<Button
style={{
marginLeft: 5, height: 31
}}
icon={<ClearOutlined />}
onClick={() => {
tradingInit()
}}
>
</Button>
</div>
</div>
<div style={{ display: appSearchBox ? 'block' : 'none', }}>
<div className='mediaSearch' style={{
display: 'flex',
alignItems: 'center',
}}>
<div className='mediaLine'>
<div className='line' style={{
}} ></div>
</div>
<Button type="primary"
style={{ background: 'var(--color-searchbtn)' }}
onClick={() => {
setAppModal(true)
setAppGoodsId('')
}}
></Button>
<Search
allowClear
placeholder='请输入关键字' value={showAppkeyWords}
onSearch={handleAppSearch}
onChange={handleAppChange}
style={{
// maxWidth: '200px',
width: '170px',
height: '31px',
marginLeft: '5px'
}}
>
</Search>
<Select
allowClear
placeholder='选择审核状态'
style={{
width: '130px',
height: '31px', marginLeft: 5,
}}
onChange={(value) => {
setAppExamineStatus(value)
}}
value={appExamineStatus}
options={[
{ value: '', label: '未提交' },
{ value: '0', label: '未通过' },
{ value: '1', label: '待审核' },
{ value: '2', label: '通过' },
]}
>
</Select>
<Select
allowClear
placeholder='选择申请状态'
style={{
width: '130px',
height: '31px', marginLeft: 5,
}}
onChange={(value) => {
setAppApplyStatus(value)
}}
value={appApplyStatus}
options={[
// { value: '0', label: '已取消' },
// { value: '1', label: '未付款' },
{ value: '2', label: '资料填写中' },
{ value: '3', label: '资料审核中' },
{ value: '4', label: '线下申请中' },
{ value: '5', label: '已下证' },
]}
>
</Select>
<Button style={{
marginLeft: 5, height: 31
}}
icon={<ClearOutlined />}
onClick={() => {
appInit()
}}></Button>
</div>
</div>
<div style={{ display: trademarkBox ? 'block' : 'none', }}>
<div className='mediaSearch' style={{
display: 'flex',
alignItems: 'center',
}}>
<div className='mediaLine'>
<div className='line' style={{
}} ></div>
</div>
<Button type="primary"
style={{ background: 'var(--color-searchbtn)' }}
onClick={() => {
setTrademarkModal(true)
}}
></Button>
</div>
</div>
<div className='nowPosition'>
<img src={backImg} alt="" />
<div style={{ display: now == '首页-项目' || now == '首页-退款' || now == '首页-补正' ? 'block' : 'none' }}>
{/* <Breadcrumb
separator="|"
// items={[
// { title: <Link to={'/home'}>首页</Link> },
// ]}
items={pathArray}
/> */}
<span></span>
</div>
<div style={{ display: now == '创建项目' ? 'block' : 'none' }}>
{/* <Breadcrumb
separator="|"
// items={[
// { title: <Link to={'/home'}>首页</Link> },
// ]}
items={pathArray}
/> */}
<span style={{ cursor: 'pointer' }}
onClick={() => {
nav('/home', {
state: {
keyword: keywords,
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
// tagNot
}
})
}}
></span>
<span style={{ marginLeft: 10, marginRight: 10 }}>|</span>
<span></span>
</div>
<div style={{ display: now.includes('项目-') ? 'block' : 'none' }}>
{/* <Breadcrumb
separator="|"
// items={[
// { title: <Link to={'/home'}>首页</Link> },
// ]}
items={pathArray}
/> */}
<span style={{ cursor: 'pointer' }}
onClick={() => {
nav('/home', {
state: {
keyword: keywords,
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
// tagNot
}
})
}}
></span>
<span style={{ marginLeft: 10, marginRight: 10 }}>|</span>
<span>{projStatus}</span>
</div>
<div style={{ display: now == '新建项目' ? 'block' : 'none' }}>
{/* <Breadcrumb
separator="|"
// items={[
// { title: <Link to={'/home'}>首页</Link> },
// ]}
items={pathArray}
/> */}
<span style={{ cursor: 'pointer' }}
onClick={() => {
nav('/home', {
state: {
keyword: keywords,
type: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
// tagNot
}
})
}}
></span>
<span style={{ marginLeft: 10, marginRight: 10 }}>|</span>
<span></span>
</div>
<div style={{ display: now == '首页-合同下载' ? 'block' : 'none' }}>
<span></span>
</div>
</div>
</div>
</div>
{/* {
listData.type === IndexListDataType.PROJ ? <ListProj/> : (
listData.type == IndexListDataType.AGENT ? <ListProjAgent/> : <></>
)
} */}
<div>
<Outlet></Outlet>
</div>
</div>
</div>
</IndexListDispatchContext.Provider>
</IndexListContext.Provider>
<Modal
title="申请退款"
destroyOnClose={true}
open={refunModal}
footer={null}
onCancel={() => {
setRefunModal(false)
}}
okButtonProps={{ style: { background: 'red', color: 'white' } }}
width={592}
maskClosable={false} // 禁止通过点击蒙层关闭
centered
>
<RefunModal closeModal={() => { setRefunModal(false) }}></RefunModal>
</Modal>
<Modal
title="申请补正"
destroyOnClose={true}
open={correctionModal}
footer={null}
maskClosable={false} // 禁止通过点击蒙层关闭
onCancel={() => {
setCorrectionModal(false)
}}
okButtonProps={{ style: { background: 'red', color: 'white' } }}
width={592}
centered
>
<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}
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}
destroyOnClose
open={couponModal}
width={809}
onCancel={() => {
// setCouponModal(false)
// setUnRead(0)
dispath({
type: 'changeCouponModal',
val: false
})
}}>
<HeadCouponModal closeModal={() => {
// setCouponModal(false)
dispath({
type: 'changeCouponModal',
val: false
})
nav('/proj-create')
setMenuActive('ALL')
}}></HeadCouponModal>
</Modal>
<Modal title="可领取优惠券"
footer={null}
centered
destroyOnClose
open={getCouponModal && !phoneModal}
width={809}
onCancel={() => {
// setCouponModal(false)
// setUnRead(0)
setGetCouponModal(false)
}}
zIndex={99}
>
<div className='headModal-bot'>
{couponArray.map((item: any) => {
return (
<div className='couponList' key={item.couponId} >
<div className='content'>
<div className='content-noUse-left'>
<div className='content-left-num'>
<div
style={{ marginTop: -10 }}
>
<span style={{ fontSize: 30 }}></span>
<span style={{ fontSize: 60, fontWeight: 700 }}>{item.amount / 100}</span>
</div>
</div>
</div>
<div className='content-right'>
<div style={{ display: 'flex', marginTop: 20, justifyContent: 'space-between' }}>
<div className='content-text'>
使
</div>
<div className='content-rule' onClick={() => {
// window.open('https://www.aimzhu.com/CouponRule.html')
getCouponUrl()
}}>
使
</div>
</div>
<div className='content-bot'>
<div className='content-time'>
:{item.useGmtStart} {item.useGmtEnd}
</div>
<div className='content-button' style={{
background: '#1677FF'
}} onClick={() => {
// props.closeModal()
receiveCoupons(item.couponId)
}}>
</div>
</div>
</div>
</div>
</div>
)
})}
</div>
</Modal>
<Modal
title="选择所属者"
destroyOnClose={true}
open={selectBelongPeople}
footer={null}
onCancel={() => {
// setSelectBelongPeople(false)
setselectedRowKeys([])
setNowauthorId('')
setNowauthorName('')
setSelectBelongPeople(false)
}}
width={1000}
maskClosable={false} // 禁止通过点击蒙层关闭
centered
>
<Spin tip="加载中..." size="small" spinning={loading}>
<div>
<Search
allowClear
placeholder='请输入关键字' value={ownerKeyWords}
onSearch={(value) => {
setOwnerKeyWords(value)
getProjOwnerList(1, value)
}}
style={{
width: '200px',
height: '31px',
marginBottom: 10
}}
onChange={
(e) => {
setOwnerKeyWords(e.target.value)
if (e.target.value == '') {
setOwnerKeyWords('')
setOwnerPage(1)
getProjOwnerList(1, '')
}
}
}
></Search>
</div>
<Table
rowSelection={{
selectedRowKeys: selectedRowKeys,
type: 'radio',
// ...rowSelection,
onChange: (_selectedRowKeys: React.Key[], selectedRows: DataType[]) => {
// console.log('selectedRows: ', selectedRows);
setselectedRowKeys([selectedRows[0].projOwnerId])
// setnewProjId(selectedRows[0].projId)
// setnewprojName(selectedRows[0].projName)
setNowauthorId(selectedRows[0].projOwnerId)
setNowauthorName(selectedRows[0].name)
},
}}
columns={columns}
dataSource={ownerList}
rowKey={'projOwnerId'}
pagination={
{
pageSize: 10,
total: ownerTotal,
onChange: (currentPage) => {
setOwnerPage(currentPage);
getProjOwnerList(currentPage, ownerKeyWords)
},
showSizeChanger: false,
current: ownerPage
}
}
locale={{
emptyText:
<Empty
description="暂无数据"
/>,
}}
// scroll={{ y: 500 }}
onRow={(record: DataType) => {
return {
onClick: (event: React.MouseEvent<HTMLTableRowElement>) => {
// 阻止默认的行点击事件,以避免选中行时触发其他操作
event.stopPropagation();
// 更新选中的行
setselectedRowKeys([record.projOwnerId]);
// setnewProjId(record.projId);
// setnewprojName(record.projName);
setNowauthorId(record.projOwnerId)
setNowauthorName(record.name)
},
style: { cursor: 'pointer' },
};
}}
/>
<div style={{
display: 'flex',
justifyContent: 'flex-end'
}}>
<div>
<Button
onClick={() => {
setselectedRowKeys([])
setNowauthorId('')
setNowauthorName('')
setSelectBelongPeople(false)
}}
></Button>
<Button style={{ marginLeft: 10 }} type="primary"
onClick={() => {
if (nowauthorId) {
setauthorId(nowauthorId)
setauthorName(nowauthorName)
setSelectBelongPeople(false)
// setselectedRowKeys([]);
} else {
messageApi.error('请选择所属者')
}
}}
></Button>
</div>
</div>
</Spin>
</Modal>
{/* 编辑弹窗 */}
<Modal title={'发布商品'}
destroyOnClose={true}
open={sellModal}
footer={null} // footer 设置为 null 来隐藏自带按钮
width={1152}
onCancel={() => {
setSellModal(false);
}}
// height={height - '20px'}
centered
>
{/* <div style={{ height: `${height - 20}px`, borderTop: '1px solid #e8e8e8' }}> */}
<EditModal nav={
() => {
nav('/product-release', {
state: {
sellKeywords: '',
sellBelongType: '',
sellDate: '',
language: '',
sellBoxtype: '',
}
})
}
} closeModal={() => { setSellModal(false) }} ></EditModal>
{/* </div> */}
</Modal>
<Modal
title="申请电子软著"
destroyOnClose={true}
open={appModal}
footer={null}
onCancel={() => {
setAppModal(false)
}}
okButtonProps={{ style: { background: 'red', color: 'white' } }}
width={830}
// maskClosable={false} // 禁止通过点击蒙层关闭
centered
>
<Spin tip="正在购买..." size="small" spinning={buyLoading}>
<div style={{
paddingBottom: 30,
paddingTop: 30
}}>
<div style={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
}}>
{appGoodsArray.map((item: any, index: number) => {
return (
<div className='appGoodsBox'
key={item.id}
style={{
background: item.back == 'black' ? '#F9F9F9 ' : '#DDECFF',
border: item.id == appGoodsId ? '1px solid #f19e31' : '',
boxShadow: item.id == appGoodsId ? '5px 5px 10px rgb(114, 114, 114)' : '',
marginTop: item.id == appGoodsId ? -20 : 0,
}}
onClick={() => {
setAppGoodsId(item.id)
// console.log('item.dataId: ', item.dataId);
}}
>
<div className='appGoodsTop'>
<div className='appgoodsTitle'
style={{
color: index !== 1 ? '#E2B682' : '#FFFFFF',
backgroundImage: index !== 1 ? `url(${topblack})` : `url(${topblue})`,
}}
>
{item.title}
</div>
</div>
<div className='appGoodsBot'>
<div className='appgoodsPrice' style={{
color: index !== 1 ? '#835114' : '#233E9E',
}}>
<span></span>
<span style={{
fontSize: 42,
}}>{item.money / 100}</span>
<span>/</span>
</div>
</div>
</div>
)
})}
</div>
<div className='appGoodsBtnBox'>
<div className='appGoodsBtn' onClick={async () => {
if (appGoodsId) {
// alert('开发中')
// 创建按订单 如果成功 询问是否继续编辑
// setAppGoodsId('')
try {
setBuyLoading(true)
const res = await buyAppGoods(appGoodsId)
setAppOrderId(res.data)
setBuyLoading(false)
setAppModal(false)
getAppOrderList(1)
setToEditsModal(true)
appInit()
reloadUser(messageApi, globalDispatchContext).then(() => {
messageApi.success('扣款成功');
});
// 更新redux中的appGoodsListAray
} catch (error: any) {
if (error.response) {
const data = error.response.data;
messageApi.open({
type: 'error',
content: data.msg ? data.msg : `${data.path}(${data.status})`,
});
} else {
console.error(error)
}
} finally {
setBuyLoading(false)
}
return
} else {
messageApi.error('请选择商品')
}
}}></div>
</div>
</div>
</Spin>
</Modal>
<Modal
title="提示"
destroyOnClose={true}
open={toEditsModal}
// footer={null}
onCancel={() => {
setToEditsModal(false)
}}
// okButtonProps={{ style: { background: 'red', color: 'white' } }}
onOk={() => {
setToEditsModal(false)
nav(`/app-edit/${appOrderId}`)
}}
// 设置确定和取消得文字
okText="编辑"
cancelText="取消"
width={600}
// maskClosable={false} // 禁止通过点击蒙层关闭
centered
>
<div>,</div>
</Modal>
<Modal
title="申请商标"
destroyOnClose={true}
open={trademarkModal}
footer={null}
onCancel={() => {
setTrademarkModal(false)
}}
okButtonProps={{ style: { background: 'red', color: 'white' } }}
width={1000}
// maskClosable={false} // 禁止通过点击蒙层关闭
centered
>
<div className='trademarkArrayBox'>
{trademarkArray.map((item) => {
return (
<div className='trademarkItem' key={item.id}>
<div style={{
position: 'absolute',
right: -6,
top: -8,
}}>
<div style={{
display: item.cheap ? 'unset' : 'none',
}}>
<img src={right} width={60} height={62} alt="" />
</div>
</div>
<div className='trademarkItemTop'>
<div className='trademarkItemTitle'>
{item.title}
</div>
<div className='trademarkItemText'>
{item.text}
</div>
<div className='trademarkItemTextBox'>
<div>{item.left}</div>
<div>{item.right}</div>
</div>
<div className='trademarkTextArrayBox'>
{
item.textArray.map((item: any, index) => {
return (
<div style={{
display: 'flex',
alignItems: 'center',
}}
key={index}>
<img src={yes} style={{
marginTop: 3,
}} width={19} height={15} alt="" />
<div className='trademarkArrayItemText' >
{item}
</div>
</div>
)
})
}
</div>
<div className='trademarkBuy'>
<div style={{
background: item.num > 0 ? 'linear-gradient(90deg, #FF6F26 0%, #FFA44C 100%)' : '',
color: 'white'
}}>
{item.num > 0 ? `新用户专项价格限购${item.num}` : ''}
</div>
</div>
<div className='trademarkPrice'>
<div className='trademarkNowPrice'>
<span></span>
<span style={{ fontSize: 42 }}>{item.nowprice}</span>
<span style={{
// 数组第一个才显示
display: item.old ? 'unset' : 'none'
}}></span>
</div>
<div className='trademarkOldPrice' style={{
display: item.old ? 'unset' : 'none'
}}>
:{item.oldprice}
</div>
</div>
</div>
<div className='trademarkItemBtn'>
<div style={{
display: item.serve ? 'unset' : 'none'
}}>
<div style={{
width: '100%',
display: 'flex',
}}>
<div style={{
flex: 1,
border: '1px solid #FF9C00',
fontSize: 18,
color: '#FF9C00',
textAlign: 'center',
lineHeight: '46px',
cursor: 'pointer'
}}></div>
<div
style={{
flex: 1,
fontSize: 18,
color: '#FFFFFF',
textAlign: 'center',
lineHeight: '46px',
background: 'linear-gradient(90deg, #FF6F26 0%, #FFA44C 100%)',
cursor: 'pointer'
}}
onClick={() => {
console.log(item.nowprice);
setTrademarkModal(false)
nav('/trademark-expert-edit')
console.log('简单');
}}
></div>
</div>
</div>
<div style={{
display: item.serve ? 'none' : 'unset'
}}>
<div style={{
width: '100%',
display: 'flex',
}}>
<div
style={{
flex: 1,
fontSize: 18,
color: '#FFFFFF',
textAlign: 'center',
lineHeight: '46px',
background: 'linear-gradient(90deg, #FF6F26 0%, #FFA44C 100%)',
cursor: 'pointer'
}}
onClick={() => {
console.log(item.nowprice);
console.log('复杂');
}}
></div>
</div>
</div>
</div>
</div>
)
})}
</div>
</Modal >
<div className='couponMask-box'
style={{
display: coupon && (location.pathname == '/' || location.pathname.includes('/home')) && couponArray.length == 1 && !phoneModal ? 'unset' : 'none',
zIndex: 99
}}
>
<div className='couponMask' >
<div className='couponMask-img'>
{/* <img src={downloadUrl(cpuponImg, false)} alt="" width={'100%'} height={'100%'} onClick={() => {
}}
className='testImg'
/> */}
<img src={cpuponImg} alt="" width={'100%'} height={'100%'} onClick={() => {
}}
className='testImg'
/>
<div className='couponMask-btn' onClick={() => {
receiveCoupon()
}}>
</div>
</div>
<div className='couponMask-close' onClick={() => {
setCoupon(false)
}}>
<CloseOutlined />
</div>
</div>
</div>
</>
)
}