import './index.css'; // import { MouseEvent, Reducer, useEffect, useReducer, useState, useContext } from "react"; import { MouseEvent, Reducer, useEffect, useReducer, useState } from "react"; import { useSelector, useDispatch } from 'react-redux' import { useNavigate, useSearchParams, Outlet } from "react-router-dom"; import { Modal } from 'antd'; 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 } from 'antd'; import { IndexListContext, IndexListDataType, IndexListDispatchContext, ListAction, ListData, } from "../../context/IndexListContext.ts"; // import { getMenuActive } from '../../util/cache.ts' import { MenuFoldOutlined, ClearOutlined, CloseOutlined } from '@ant-design/icons'; import { useLocation } from 'react-router-dom'; import { get, // downloadUrl, post, getCouponUrl } from '../../util/AjaxUtils.ts' import { setMenuActive } from '../../util/cache.ts' import gpsImg from '../../static/right/gps.png' import backImg from '../../static/right/back.png' // import { Link } from "react-router-dom"; import HeadCouponModal from '../../components/CouponModal/HeadCouponModal.tsx' import { Input, // Breadcrumb, message } from 'antd'; const { Search } = Input; export default function Index() { // 是否可以点击所属者 (当点击了退款选项,所属者列表跟他不产生联系 不给他点) // 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 belongArray = redxuState.belongArray // 优惠券弹窗 const couponModal = redxuState.couponModal // 编辑项目得项目名 // const projName = redxuState.projName // 从sessionStorage缓存获取项目名 const projName = sessionStorage.getItem('projName') // 项目状态 查看还是编辑 // const projStatus = redxuState.projStatus const projStatus = sessionStorage.getItem('projStatus') // 获取所属者表格储存至redux 更新表格 const getProjOwnerList = () => { get({ messageApi, url: `/api/proj-owner/list/self`, onBefore() { }, onSuccess(data: any) { // console.log('所属者表格', data.data); // setBelongPeopleArray(data.data) // 存redux的belongArray dispath({ type: 'uparray', val: data.data }) }, onFinally() { } }) } // 更新数据 // 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 [authorId, setauthorId] = 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') } // 退款页初搜索条件始化 const refunInit = () => { setnewRefunValue('') setrefunKeywords('') setapplyStatus(null) // 刷新当前页面 } // 补正页面搜索条件初始化 const correctionInit = () => { setnewCorrectionValue('') setcorrectionKeywords('') setcorrectionNumType(null) setcorrectionType(null) setcorrectionApplyStatus(null) setTagCor(null) } 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) { 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: '1', name: '商品发布', path: '/product-release' }, { id: '2', name: '交易订单', path: '/transaction-order' }, // { 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: '1', name: '著作权商品', path: '/copyright-goods' }, { id: '2', name: '交易商品', path: '/trading-goods' }, // { 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 [correctionSearchBox, setCorrectionSearchBox] = useState(false) // 新增合同按钮是否显示 const [contractSearchBox, setContractSearchBox] = useState(false) // 优惠券遮罩层是否i西安市 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() { } }) } 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) } else if (location.pathname.includes('/proj-create')) { setShowSearchBox(false) setRrefunSearchBox(false) setCorrectionSearchBox(false) setContractSearchBox(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) // setEditname(location.pathname) // setPathArray([{ title: 首页 }, { title: '编辑项目' }]) } else if (location.pathname.includes('/proj-new')) { setNow(`创建项目`) setShowSearchBox(false) setRrefunSearchBox(false) setCorrectionSearchBox(false) setContractSearchBox(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) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { title: '编辑项目' }]) } else if (location.pathname.includes('/proj-eall')) { setNow(`${projStatus}项目 / ${projName}`) setShowSearchBox(false) setRrefunSearchBox(false) setCorrectionSearchBox(false) setContractSearchBox(false) // setNewname(location.pathname) // setPathArray([{ title: 首页 }, { title: '编辑项目' }]) } else if (location.pathname.includes('/proj-edit/step1')) { setNow('标题简介') setShowSearchBox(false) setRrefunSearchBox(false) setCorrectionSearchBox(false) setContractSearchBox(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) // 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) // 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) // 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) // 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) // 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) // 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) // 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) setContractSearchBox(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) // 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) // 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) // 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) // 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) // 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) // 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('首页 / 合同下载') } }, [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() }, []); useEffect(() => { 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 (
{ // const isHome = getMenuActive() == 'ALL' || getMenuActive() == 'PROCESSING' || getMenuActive() == 'COMPLETE' if (authorId == item.projOwnerId) { setauthorId('') // if (isHome) { // nav('/home', { // state: { // keyword: keywords, // type: type, // chargeAdditionals: chargeAdditionals, // tagDataId: tagDataId, // authorId: '', // payStatus: payStatus // } // }) // } // if (getMenuActive() == 'REFUN') { // nav('/refun', { // state: { // state: { // keywords: refunKeywords, // applyStatus: applyStatus, // authorId: '', // } // } // }) // } } else { setauthorId(item.projOwnerId) // if (isHome) { // nav('/home', { // state: { // keyword: keywords, // type: type, // chargeAdditionals: chargeAdditionals, // tagDataId: tagDataId, // authorId: item.projOwnerId, // payStatus: payStatus // } // }) // } // if (getMenuActive() == 'REFUN') { // nav('/refun', { // state: { // state: { // keywords: refunKeywords, // applyStatus: applyStatus, // authorId: item.projOwnerId, // } // } // }) // } } // alert(getMenuActive()) // const menuName = (getMenuActive()) // // const menuTrue = menuName == 'ALL' || 'PROCESSING' || 'COMPLETE' // if(menuName == 'ALL' || 'PROCESSING' ||'COMPLETE' ){ // alert(1) // }else{ // alert(2) // } }} style={{ background: authorId == item.projOwnerId ? '#FF9F08' : '', color: authorId == item.projOwnerId ? '#FFF' : '' }} title={item.name} // 添加 title 属性以显示完整文本 > {item.name}
) }) }
{/* 分页控件 */} {/*
*/}
0 ? 'none' : 'block', height: 230 }}>
{/* */} {/* */} {/* */} {/* */} {/* */}
{/*
*/}
{/* 标签 */} {/* {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={'选择提醒'} />
{ 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 />
{ 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 />
{/* 首页 }, // ]} 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) }}>
{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) }}> 立即领取
) })}
{/* { }} className='testImg' /> */} { }} className='testImg' />
{ receiveCoupon() }}> 立即领取
{ setCoupon(false) }}>
) }