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 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 = [ { 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(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([]) // 更新数据 // 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(null) const [chargeAdditionals, setchargeAdditionals] = useState(null) const [tagDataId, settagDataId] = useState(null) const [payStatus, setpayStatus] = useState(null) const [nowauthorId, setNowauthorId] = useState('') //临时id const [authorId, setauthorId] = useState('') //所属者id const [nowauthorName, setNowauthorName] = useState('') //临时名称 const [authorName, setauthorName] = useState('') //所属者名称 const [projRemindId, setprojRemindId] = useState(null) //退款状态 const [applyStatus, setapplyStatus] = useState(null) // 退款关键字 const [refunKeywords, setrefunKeywords] = useState('') // 退款临时关键字 const [newRefunValue, setnewRefunValue] = useState('') //补正搜索相关 // 补正关键字 const [correctionKeywords, setcorrectionKeywords] = useState('') // 补正临时关键字 const [newCorrectionValue, setnewCorrectionValue] = useState('') // 补正类型 const [correctionNumType, setcorrectionNumType] = useState(null) // 补正种类 const [correctionType, setcorrectionType] = useState(null) // 补正状态 const [correctionApplyStatus, setcorrectionApplyStatus] = useState(null) // const indexListContext = useContext(IndexListContext); // 所属者信息 // const [belongPeopleArray, setBelongPeopleArray] = useState([]) // 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>(listReducer, { type: IndexListDataType.PROJ, categoryChangeCount: 0 }); const [projMenu, setProjMenu] = useState({ 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: '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({ // 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({ // 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({ // button: { // name: '代理服务', // handle() { // dispatch({ // type: IndexListDataType.PROJ, // value: 'COMPLETE', // }) // } // }, // list: [ // { id: 'ALL', name: '全部项目' }, // { id: 'PROCESSING', name: '进行中的' }, // { id: 'COMPLETE', name: '已完成的' }, // ], // handleListItem(_e: MouseEvent, _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({ 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, _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({ button: { name: '我要买', handle() { // dispatch({ // type: IndexListDataType.PROJ, // value: 'COMPLETE', // }) } }, list: [ { id: 'COPYRIGHT', name: '著作权商品' }, { id: 'TRADING', name: '交易商品' }, // { id: 'COMPLETE', name: '已完成的' }, ], handleListItem(_e: MouseEvent, _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({ // 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, _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('首页 / 项目') // 编辑项目路由名 // const [editname,setEditname] = useState('') // 新建项目路由名字 // const [newname,setNewname] = useState('') // const [pathArray, setPathArray] = useState([]) 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(null) // 所属人类型 // 更改所属人类型 const sellBelongTypeChange = (value: string) => { console.log(`selected ${value}`); setSellBelongType(value) } const [sellDate, setSellDate] = useState(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(null) // 开发者语言 // 更改开发者语言 const selectLanguage = (value: string) => { setLanguage(value) } const [sellBoxtype, setSellBoxType] = useState(null) //软著类型 // 选择软著类型 const selectType = (value: string) => { setSellBoxType(value) } // 更改关键字 const sellKeyWordshandleChange = (e: React.ChangeEvent) => { 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(null) // 开始时间 const [sellEndTime, setSellEndTime] = useState(null) // 结束时间 const [sellOrderStatus, setSellOrderStatus] = useState(null) // 订单状态 const sellOrderKeyWordshandleChange = (e: React.ChangeEvent) => { 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() //最低价格 const [maxPrice, setMaxPrice] = useState() //最高价格 const [sort, setSort] = useState() //排序 const [copyrightDate, setCopyrightDate] = useState() //获取时间 const [copyrightLanguage, setCopyrightLanguage] = useState() //开发语言 const [copyrightType, setCopyrightType] = useState() //软著类型 // 更改最低价格 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) => { 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() // 开始时间 const [tradingEndTime, setTradingEndTime] = useState() // 结束时间 const [tradingStatus, setTradingStatus] = useState() // 订单状态 const tradingKeyWordshandleSearch = () => { setTradingKeywords(tradingNewKeywords) } const tradingKeyWordshandleChange = (e: React.ChangeEvent) => { 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([]) // 电子软著可选商品列表 const [buyLoading, setBuyLoading] = useState(false) // 购买loading const [appOrderId, setAppOrderId] = useState() // 电子软著订单id const [appExamineStatus, setAppExamineStatus] = useState(null) // 电子软著审核状态 const [appApplyStatus, setAppApplyStatus] = useState(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(() => { 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 [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([]) //优惠券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({ messageApi, url: `/api/coupon/user/save`, body: { couponId: couponId }, onBefore() { }, onSuccess() { messageApi.success('领取成功') setTimeout(() => { setCoupon(false) // getCoupon() }, 500) }, onFinally() { } }) } // 领取优惠券(多张) const receiveCoupons = (id: string) => { post({ 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([]) // 开发者语言列表 // 获取语言列表 // 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([]) // 软著类型列表 // 获取软著类型列表 // 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) } 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) setNow('创建项目') // setPathArray([{ title: 首页 }, { 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) // setEditname(location.pathname) // setPathArray([{ title: 首页 }, { 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) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { title: 创建项目 }, { 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) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { 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) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { 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) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { 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) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { 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) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { 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) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { 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) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { 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) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { 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) // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { 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) // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-2) }}>编辑项目 }, { title: { nav(-1) }}>系统菜单管理 }, { 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) // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-2) }}>编辑项目 }, { title: { nav(-1) }}>系统菜单管理 }, { 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) // 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) // 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) // 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) // 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) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { 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) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { 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) } 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) } 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) } 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) } }, [location.pathname]) useEffect(() => { // nav('/home') // sessionStorage.setItem('pathArray', JSON.stringify([{ title: 首页 }])); // 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('') // 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 ( <> {/* 首页} ]} /> */} {contextHolder}
{/*
*/} {/*
*/}
{setClickBelongpeople(true)}} /> {/*
产权所属者
0 ? 'block' : 'none' }}>
{ currentPageData.map((item: any) => { return (
{ 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}
) }) }
0 ? 'none' : 'block', height: 230 }}>
*/} {/* */} {/* */} {THEME == 'mzw' ? ( <>
{ 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); }} >
电子软著APP
{ 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); }} >
商标商城
) : ( <> )} {THEME == 'mzw' ? ( ) : ( <> )} {/* */} {/* */} {/* */}
{/*
*/}
{/* 标签 */} {/* {renderStatus()} */}
{now}
{ // 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={'选择拓展收费'} /> { // 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={'选择提醒'} />
{ setauthorId(value) nav('/home', { state: { keyword: keywords, type: type, chargeAdditionals: chargeAdditionals, tagDataId: tagDataId, authorId: value, payStatus: payStatus, projRemindId: projRemindId, // tagNot } }) }} options={belongArrayList} placeholder={'选择所属者'} /> */}
{ // 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 // } // }) }} >
{ setauthorName('') setauthorId('') setNowauthorId('') setNowauthorName('') setselectedRowKeys([]); nav('/home', { state: { keyword: keywords, type: type, chargeAdditionals: chargeAdditionals, tagDataId: tagDataId, authorId: '', payStatus: payStatus, projRemindId: projRemindId, // tagNot } }) }} />
{ setauthorId(value) nav('/refun', { state: { keywords: refunKeywords, applyStatus: applyStatus, authorId: value, } }) }} options={belongArrayList} placeholder={'选择所属者'} /> */}
{ // 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 // } // }) }} >
{ setauthorName('') setauthorId('') setNowauthorId('') setNowauthorName('') setselectedRowKeys([]); nav('/refun', { state: { keywords: refunKeywords, applyStatus: applyStatus, authorId: '', } }) }} />
{ 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={'选择补正种类'} /> { setTagCor(value) nav('/correction', { state: { keywords: correctionKeywords, correctionNumType: correctionNumType, correctionType: correctionType, applyStatus: applyStatus, authorId: authorId, tagCor: value, } }) }} options={ tagCorArray } // defaultValue="" placeholder={'选择标签'} allowClear /> {/*
{ // 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 // } // }) }} >
{ setauthorName('') setauthorId('') setNowauthorId('') setNowauthorName('') setselectedRowKeys([]); nav('/correction', { state: { keywords: correctionKeywords, correctionNumType: correctionNumType, correctionType: correctionType, applyStatus: applyStatus, authorId: '', tagCor: tagCor, } }) }} />
{/* 首页 }, // ]} items={pathArray} /> */} 首页
{/* 首页 }, // ]} items={pathArray} /> */} { nav('/home', { state: { keyword: keywords, type: type, chargeAdditionals: chargeAdditionals, tagDataId: tagDataId, authorId: authorId, payStatus: payStatus, // tagNot } }) }} >首页 | 创建项目
{/* 首页 }, // ]} items={pathArray} /> */} { nav('/home', { state: { keyword: keywords, type: type, chargeAdditionals: chargeAdditionals, tagDataId: tagDataId, authorId: authorId, payStatus: payStatus, // tagNot } }) }} >首页 | {projStatus}项目
{/* 首页 }, // ]} items={pathArray} /> */} { nav('/home', { state: { keyword: keywords, type: type, chargeAdditionals: chargeAdditionals, tagDataId: tagDataId, authorId: authorId, payStatus: payStatus, // tagNot } }) }} >首页 | 新建项目
首页
{/* { listData.type === IndexListDataType.PROJ ? : ( listData.type == IndexListDataType.AGENT ? : <> ) } */}
{ setRefunModal(false) }} okButtonProps={{ style: { background: 'red', color: 'white' } }} width={592} maskClosable={false} // 禁止通过点击蒙层关闭 centered > { setRefunModal(false) }}> { setCorrectionModal(false) }} okButtonProps={{ style: { background: 'red', color: 'white' } }} width={592} centered > { setCorrectionModal(false) }} > { setContractModal(false) }} okButtonProps={{ style: { background: 'red', color: 'white' } }} width={592} centered > { setContractModal(false) }}> { // setCouponModal(false) // setUnRead(0) dispath({ type: 'changeCouponModal', val: false }) }}> { // setCouponModal(false) dispath({ type: 'changeCouponModal', val: false }) nav('/proj-create') setMenuActive('ALL') }}> { // setCouponModal(false) // setUnRead(0) setGetCouponModal(false) }} zIndex={99} >
{couponArray.map((item: any) => { return (
{item.amount / 100}
可购买平台内任意软著时使用
{ // window.open('https://www.aimzhu.com/CouponRule.html') getCouponUrl() }}> 使用规则
有效期:{item.useGmtStart} 至 {item.useGmtEnd}
{ // props.closeModal() receiveCoupons(item.couponId) }}> 立即领取
) })}
{ // setSelectBelongPeople(false) setselectedRowKeys([]) setNowauthorId('') setNowauthorName('') setSelectBelongPeople(false) }} width={1000} maskClosable={false} // 禁止通过点击蒙层关闭 centered >
{ 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, '') } } } >
{ // 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: , }} // scroll={{ y: 500 }} onRow={(record: DataType) => { return { onClick: (event: React.MouseEvent) => { // 阻止默认的行点击事件,以避免选中行时触发其他操作 event.stopPropagation(); // 更新选中的行 setselectedRowKeys([record.projOwnerId]); // setnewProjId(record.projId); // setnewprojName(record.projName); setNowauthorId(record.projOwnerId) setNowauthorName(record.name) }, style: { cursor: 'pointer' }, }; }} />
{/* 编辑弹窗 */} { setSellModal(false); }} // height={height - '20px'} centered > {/*
*/} { nav('/product-release', { state: { sellKeywords: '', sellBelongType: '', sellDate: '', language: '', sellBoxtype: '', } }) } } closeModal={() => { setSellModal(false) }} > {/*
*/}
{ setAppModal(false) setAppGoodsId('') }} okButtonProps={{ style: { background: 'red', color: 'white' } }} width={830} // maskClosable={false} // 禁止通过点击蒙层关闭 centered >
{appGoodsArray.map((item: any, index: number) => { return (
{ setAppGoodsId(item.dataId) // console.log('item.dataId: ', item.dataId); }} >
{item.dataSummary}
{item.dataName / 100} 元/件
) })}
{ 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) } } return } else { messageApi.error('请选择商品') } }}>下单购买
{ setToEditsModal(false) }} // okButtonProps={{ style: { background: 'red', color: 'white' } }} onOk={() => { setToEditsModal(false) nav(`/app-edit/${appOrderId}`) }} // 设置确定和取消得文字 okText="编辑" cancelText="取消" width={600} // maskClosable={false} // 禁止通过点击蒙层关闭 centered >
已生成订单,是否编辑
{ setTrademarkModal(false) }} okButtonProps={{ style: { background: 'red', color: 'white' } }} width={1000} // maskClosable={false} // 禁止通过点击蒙层关闭 centered >
{trademarkArray.map((item) => { return (
{item.title}
{item.text}
{item.left}
{item.right}
{ item.textArray.map((item: any, index) => { return (
{item}
) }) }
0 ? 'linear-gradient(90deg, #FF6F26 0%, #FFA44C 100%)' : '', color: 'white' }}> {item.num > 0 ? `新用户专项价格限购${item.num}件` : ''}
{item.nowprice}
原价:{item.oldprice}元
专家咨询
{ console.log(item.nowprice); setTrademarkModal(false) nav('/trademark-expert-edit') console.log('简单'); }} >开始编辑
{ console.log(item.nowprice); console.log('复杂'); }} >开始编辑
) })}
{/* { }} className='testImg' /> */} { }} className='testImg' />
{ receiveCoupon() }}> 立即领取
{ setCoupon(false) }}>
) }