暂存
This commit is contained in:
parent
2c1ee180d2
commit
f5d16ee6ee
@ -217,11 +217,12 @@ export default function NoticeModal() {
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: (newselectedRowKeys: React.Key[], selectedRows: DataType[]) => {
|
||||
selectedRowKeyRef.current[page]=newselectedRowKeys
|
||||
selectedRowRef.current[page]=selectedRows
|
||||
selectedRowKeyRef.current[page] = newselectedRowKeys
|
||||
selectedRowRef.current[page] = selectedRows
|
||||
// console.log(11111111, newselectedRowKeys, selectedRowKeyRef.current);
|
||||
|
||||
const arr=[]
|
||||
|
||||
const arr = []
|
||||
for (const element in selectedRowKeyRef.current) {
|
||||
// console.log(22222,element);
|
||||
|
||||
@ -229,7 +230,7 @@ export default function NoticeModal() {
|
||||
}
|
||||
setSelectedRowKeys(arr);
|
||||
|
||||
const arrIds=[]
|
||||
const arrIds = []
|
||||
for (const element in selectedRowRef.current) {
|
||||
// console.log(22222,element);
|
||||
|
||||
@ -238,6 +239,7 @@ export default function NoticeModal() {
|
||||
|
||||
const selectedOrderIds = arrIds.map(row => row.userMsgId);
|
||||
setIds(selectedOrderIds)
|
||||
// setIds(arr)
|
||||
},
|
||||
};
|
||||
|
||||
|
30
src/components/RefunModal/RefunModal.css
Normal file
30
src/components/RefunModal/RefunModal.css
Normal file
@ -0,0 +1,30 @@
|
||||
.refunModal{
|
||||
padding-top: 20px;
|
||||
}
|
||||
.refunModal-item{
|
||||
display: flex;
|
||||
/* background-color: skyblue; */
|
||||
/* align-items: center; */
|
||||
/* justify-content: center; */
|
||||
}
|
||||
.refunModal-title{
|
||||
font-size: 16px;
|
||||
margin-right: 22px;
|
||||
/* background-color: pink; */
|
||||
width: 80px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.refunModal-red{
|
||||
font-size: 20px;
|
||||
margin-left: 5px;
|
||||
color:#F04C4C
|
||||
}
|
||||
.refunModal-btn{
|
||||
/* background-color: skyblue; */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
}
|
189
src/components/RefunModal/RefunModal.tsx
Normal file
189
src/components/RefunModal/RefunModal.tsx
Normal file
@ -0,0 +1,189 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import './RefunModal.css'
|
||||
import { Form, Select, Button, Upload, message, Input } from 'antd';
|
||||
import { UploadOutlined } from '@ant-design/icons';
|
||||
import { uploadImageUrl, DevUserId,get } from "../../util/AjaxUtils.ts";
|
||||
const { TextArea } = Input;
|
||||
|
||||
export default function RefunModal(props:any) {
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
// 上传附件
|
||||
const [refunArray, setRefunArray] = useState<string[]>([]);
|
||||
const [selectedReason, setSelectedReason] = useState(''); //选择原因
|
||||
|
||||
const handleReasonChange = (value: any) => {
|
||||
setSelectedReason(value);
|
||||
};
|
||||
// const [refunDataArray,setRefunDataArray] = useState<any[]>([]) //未退款项目
|
||||
// 提交表单
|
||||
const onFinish = (values: any) => {
|
||||
console.log('Form values:', values);
|
||||
props.closeModal()
|
||||
};
|
||||
// 获取未退款项目
|
||||
const getRefunData = () => {
|
||||
get({
|
||||
messageApi,
|
||||
url: `/api/proj/refund/apply/list-proj-unapply/self`,
|
||||
// url: `/api/proj/refund/apply/listpage?applyStatus=${state.type}`,
|
||||
onSuccess({data}) {
|
||||
console.log(data);
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
useEffect(()=>{
|
||||
getRefunData()
|
||||
},[])
|
||||
return (
|
||||
<div className='refunModal'>
|
||||
{contextHolder}
|
||||
<Form
|
||||
name="Form"
|
||||
onFinish={onFinish}
|
||||
initialValues={{ softWare: '' }}
|
||||
style={{ maxWidth: 600 }}
|
||||
>
|
||||
<div className='refunModal-item'>
|
||||
<div className='refunModal-title'>
|
||||
退款软著<span className='refunModal-red'>*</span>
|
||||
</div>
|
||||
<Form.Item
|
||||
name="title"
|
||||
// label="退款软著"
|
||||
rules={[{ required: true, message: '请选择一个软著!' }]}
|
||||
>
|
||||
<Select
|
||||
showSearch
|
||||
placeholder="选择需要退款的软著"
|
||||
filterOption={(input, option) =>
|
||||
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
|
||||
}
|
||||
options={[
|
||||
{ value: '嘻嘻系统', label: '嘻嘻系统' },
|
||||
{ value: '呵呵系统', label: '呵呵系统' },
|
||||
{ value: '哈哈系统', label: '哈哈系统' },
|
||||
{ value: '哈嘎嘎系统', label: '哈嘎嘎系统' },
|
||||
{ value: '哈嘻嘻嘎嘎系统', label: '哈嘻嘻嘎嘎系统' },
|
||||
]}
|
||||
style={{
|
||||
width: 405,
|
||||
height: 46,
|
||||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
<div className='refunModal-item'>
|
||||
<div className='refunModal-title'>
|
||||
退款原因<span className='refunModal-red'>*</span>
|
||||
</div>
|
||||
<Form.Item
|
||||
name="reason"
|
||||
// label="退款软著"
|
||||
rules={[{ required: true, message: '请选择退款原因' }]}
|
||||
>
|
||||
<Select
|
||||
placeholder="选择退款原因"
|
||||
options={[
|
||||
{ value: '没钱', label: '没钱' },
|
||||
{ value: '不想买', label: '不想买' },
|
||||
{ value: '其他', label: '其他' },
|
||||
]}
|
||||
style={{
|
||||
width: 405,
|
||||
height: 46,
|
||||
}}
|
||||
onChange={handleReasonChange}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
{selectedReason === '其他' && (
|
||||
<div className='refunModal-item'>
|
||||
<div className='refunModal-title'>
|
||||
其他<span className='refunModal-red'>*</span>
|
||||
</div>
|
||||
<Form.Item
|
||||
name="other"
|
||||
rules={[{ required: true, message: '请输入退款原因' }]}
|
||||
>
|
||||
<TextArea
|
||||
placeholder="其他退款原因"
|
||||
style={{ height: 120, resize: 'none', width: 405 }}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
)}
|
||||
{/* <div className='refunModal-item' >
|
||||
<div className='refunModal-title'>
|
||||
其他<span className='refunModal-red'>*</span>
|
||||
</div>
|
||||
<Form.Item
|
||||
name="other"
|
||||
// label="退款软著"
|
||||
rules={[{ required: true, message: '请输入退款原因' }]}
|
||||
>
|
||||
<TextArea
|
||||
// showCount
|
||||
// maxLength={100}
|
||||
placeholder="其他退款原因"
|
||||
style={{ height: 120, resize: 'none', width: 405, }}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div> */}
|
||||
<div className='refunModal-item'>
|
||||
<div className='refunModal-title'>
|
||||
退款凭证<span className='refunModal-red'>*</span>
|
||||
</div>
|
||||
<div style={{ width: 405, }}>
|
||||
<Form.Item
|
||||
name="img"
|
||||
// label="退款软著"
|
||||
valuePropName="fileList"
|
||||
getValueFromEvent={(e: any) => {
|
||||
if (e.file.status === 'done') {
|
||||
refunArray.push(e.file.response.data.fileId);
|
||||
setRefunArray(refunArray);
|
||||
}
|
||||
if (e.file.status === 'removed') {
|
||||
const idArray = refunArray.filter(item => item != e.file.response.data.fileId);
|
||||
setRefunArray(idArray);
|
||||
}
|
||||
return e.fileList;
|
||||
}}
|
||||
rules={[{ required: true, message: '请上传凭证' }]}
|
||||
>
|
||||
<Upload
|
||||
name="image"
|
||||
action={uploadImageUrl()}
|
||||
headers={{ 'X-USER-ID': DevUserId }}
|
||||
beforeUpload={(file) => {
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||
if (!isJpgOrPng) {
|
||||
message.error('只能上传 JPG/PNG 格式文件!');
|
||||
return Upload.LIST_IGNORE; // 不允许上传非
|
||||
}
|
||||
return isJpgOrPng;
|
||||
}}
|
||||
// listType="picture-card"
|
||||
>
|
||||
|
||||
<Button icon={<UploadOutlined />} style={{ marginTop: 2 }}>上传凭证图片</Button>
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Form.Item>
|
||||
<div className='refunModal-btn'>
|
||||
<Button type="primary" htmlType="submit" style={{
|
||||
width: 273,
|
||||
height: 52
|
||||
}}>
|
||||
提交申请
|
||||
</Button>
|
||||
</div>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</div>
|
||||
)
|
||||
}
|
@ -62,6 +62,7 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
|
||||
{/* <img src={serveImg} alt="" /> */}
|
||||
<div className='sell-buy' style={{ display: props.button.name == '我要卖' ? 'block' : 'none' }}>卖</div>
|
||||
<div className='sell-buy' style={{ display: props.button.name == '我要买' ? 'block' : 'none' }}>买</div>
|
||||
<div className='sell-buy' style={{ display: props.button.name == '退款' ? 'block' : 'none' }}>退</div>
|
||||
<div> {props.button.name}</div>
|
||||
</div>
|
||||
|
||||
|
@ -2,6 +2,7 @@ import './menu-with-top-button.css'
|
||||
import { IMenuListItem, IMenuWithTopButton } from "../../interfaces/menu/IMenuWithTopButton.ts";
|
||||
import objImg from '../../static/left/obj.png'
|
||||
import newImg from '../../static/left/new.png'
|
||||
import refunimg from '../../static/refun.png'
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
RightOutlined
|
||||
@ -31,7 +32,9 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
|
||||
<li className={item.active ? 'active' : ''} key={item.id} onClick={(e) => {
|
||||
props.handleListItem(e, index, item);
|
||||
setMenuActive(item.id)
|
||||
navugate('/home',{
|
||||
if (props.button.name == '项目') {
|
||||
// props.enableBelongpeople()
|
||||
navugate('/home', {
|
||||
state: {
|
||||
keyword: props.keywords,
|
||||
name: props.type,
|
||||
@ -40,6 +43,16 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
|
||||
authorId: props.authorId
|
||||
}
|
||||
})
|
||||
}
|
||||
if (props.button.name == '退款') {
|
||||
// props.disableBelongpeople()
|
||||
navugate('/refun', {
|
||||
state:{
|
||||
type:item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}}>
|
||||
|
||||
{item.icon ? (<img src={item.icon} className="menu-icon" alt="加载失败" />) : <></>}
|
||||
@ -53,7 +66,9 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
|
||||
{/* button 是三个黄色按钮 */}
|
||||
<div className='top'>
|
||||
<div className='top-lift'>
|
||||
<img src={objImg} alt="" />
|
||||
<img src={objImg} alt="" style={{display:props.button.name=='项目'?'block':'none'}}/>
|
||||
<img src={refunimg} alt="" style={{display:props.button.name=='退款'?'block':'none',width:16}}/>
|
||||
|
||||
<div> {props.button.name}</div>
|
||||
</div>
|
||||
<div className='top-right' onClick={(e) => {
|
||||
@ -63,8 +78,10 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
|
||||
// console.log(props.list);
|
||||
// setMenuActive('ALL')
|
||||
}}>
|
||||
{/* refunimg */}
|
||||
<img src={newImg} alt="" />
|
||||
<div>创建</div>
|
||||
<div style={{display:props.button.name == '项目'?'block':'none'}}>创建</div>
|
||||
<div style={{display:props.button.name == '退款'?'block':'none'}}>申请</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* <button className="btn btn-orange top-button"
|
||||
|
@ -24,4 +24,6 @@ export interface IMenuWithTopButton {
|
||||
chargeAdditionals?:string;
|
||||
tagDataId?:string;
|
||||
authorId?:string;
|
||||
// disableBelongpeople?:any
|
||||
// enableBelongpeople?:any
|
||||
}
|
400
src/route/Refun/Refun.tsx
Normal file
400
src/route/Refun/Refun.tsx
Normal file
@ -0,0 +1,400 @@
|
||||
import './refun.css';
|
||||
import { useState,useEffect } from 'react';
|
||||
import { Table,
|
||||
// Pagination,
|
||||
Modal, Tag, message } from 'antd';
|
||||
import { get } from '../../util/AjaxUtils'
|
||||
import type { TableProps } from 'antd';
|
||||
interface DataType {
|
||||
title: string;
|
||||
price: string;
|
||||
reason: string;
|
||||
time: string;
|
||||
img: string;
|
||||
id: string;
|
||||
examineTime: string;
|
||||
examineStatus: string;
|
||||
examineText: string;
|
||||
}
|
||||
import revokeImg from '../../static/revoke.png'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
export default function Refun() {
|
||||
const height = window.innerHeight - 180;
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
const [page, setPage] = useState(1) // 分页
|
||||
const [total, setTotal] = useState(50) // 数据总数
|
||||
const [revokeModal, setRevokeModal] = useState(false) //撤销弹窗
|
||||
const { state } = useLocation()
|
||||
// {state.type}
|
||||
const columns: TableProps<DataType>['columns'] = state.type == 'CANCELED' ? [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
render: (_text, _record, index) => (page - 1) * 10 + index + 1, // 显示序号,从1开始
|
||||
},
|
||||
{
|
||||
title: '系统名称',
|
||||
dataIndex: 'title',
|
||||
align: 'center',
|
||||
key: 'title',
|
||||
render: (text) => <div className='ellipsis-text' title={text}>{text}</div>,
|
||||
},
|
||||
{
|
||||
title: '金额',
|
||||
dataIndex: 'price',
|
||||
key: 'price',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '退款原因',
|
||||
dataIndex: 'reason',
|
||||
key: 'reason',
|
||||
align: 'center',
|
||||
render: (text) => <div className='ellipsis-text' title={text}>{text}</div>,
|
||||
},
|
||||
{
|
||||
title: '申请退款时间',
|
||||
dataIndex: 'time',
|
||||
key: 'time',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '审核时间',
|
||||
dataIndex: 'examineTime',
|
||||
key: 'examineTime',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
dataIndex: 'examineStatus',
|
||||
key: 'examineStatus',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
render: (text) => <Tag
|
||||
color={text == "PASS" ? '#87d068' : text == "NOPASS" ? '#f50' : text == "WAIT" ? '#2db7f5' : ''}
|
||||
>{text == "PASS" ? '通过' : text == "NOPASS" ? '未通过' : text == "WAIT" ? '待审核' : '未知'}</Tag>,
|
||||
},
|
||||
{
|
||||
title: '审核意见',
|
||||
dataIndex: 'examineText',
|
||||
key: 'examineText',
|
||||
align: 'center',
|
||||
// width: 150,
|
||||
render: (text) => <div className='ellipsis-text' title={text}>{text}</div>,
|
||||
},
|
||||
{
|
||||
title: '退款凭证',
|
||||
dataIndex: 'img',
|
||||
key: 'img',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
render: (_, record) => (
|
||||
// {record.name}
|
||||
<div className='refunBtn' onClick={() => {
|
||||
console.log(record.img);
|
||||
}}> 预览</div>
|
||||
|
||||
),
|
||||
},
|
||||
|
||||
] : [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
render: (_text, _record, index) => (page - 1) * 10 + index + 1, // 显示序号,从1开始
|
||||
},
|
||||
{
|
||||
title: '系统名称',
|
||||
dataIndex: 'title',
|
||||
align: 'center',
|
||||
key: 'title',
|
||||
render: (text) => <div className='ellipsis-text' title={text}>{text}</div>,
|
||||
},
|
||||
{
|
||||
title: '金额',
|
||||
dataIndex: 'price',
|
||||
key: 'price',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '退款原因',
|
||||
dataIndex: 'reason',
|
||||
key: 'reason',
|
||||
align: 'center',
|
||||
render: (text) => <div className='ellipsis-text' title={text}>{text}</div>,
|
||||
},
|
||||
{
|
||||
title: '申请退款时间',
|
||||
dataIndex: 'time',
|
||||
key: 'time',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '审核时间',
|
||||
dataIndex: 'examineTime',
|
||||
key: 'examineTime',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
dataIndex: 'examineStatus',
|
||||
key: 'examineStatus',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
render: (text) => <Tag
|
||||
color={text == "PASS" ? '#87d068' : text == "NOPASS" ? '#f50' : text == "WAIT" ? '#2db7f5' : ''}
|
||||
>{text == "PASS" ? '通过' : text == "NOPASS" ? '未通过' : text == "WAIT" ? '待审核' : '未知'}</Tag>,
|
||||
},
|
||||
{
|
||||
title: '审核意见',
|
||||
dataIndex: 'examineText',
|
||||
key: 'examineText',
|
||||
align: 'center',
|
||||
// width: 150,
|
||||
render: (text) => <div className='ellipsis-text' title={text}>{text}</div>,
|
||||
},
|
||||
{
|
||||
title: '退款凭证',
|
||||
dataIndex: 'img',
|
||||
key: 'img',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
render: (_, record) => (
|
||||
// {record.name}
|
||||
<div className='refunBtn' onClick={() => {
|
||||
console.log(record.img);
|
||||
}}> 预览</div>
|
||||
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
// {record.name}
|
||||
<div className='refunBtn' onClick={() => {
|
||||
console.log(record.id);
|
||||
setRevokeModal(true)
|
||||
}}> 撤销</div>
|
||||
|
||||
),
|
||||
},
|
||||
];
|
||||
const getData = (page:number) => {
|
||||
get({
|
||||
messageApi,
|
||||
url: `/api/proj/refund/apply/listpage`,
|
||||
// url: `/api/proj/refund/apply/listpage?applyStatus=${state.type}`,
|
||||
config: {
|
||||
params: {
|
||||
page: page,
|
||||
rows: 10,
|
||||
applyStatus:state.type
|
||||
}
|
||||
},
|
||||
onSuccess({data}) {
|
||||
console.log(data);
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// useEffect(()=>{
|
||||
// getData(page)
|
||||
// },[])
|
||||
useEffect(()=>{
|
||||
// getData(1)
|
||||
setPage(1)
|
||||
getData(1)
|
||||
},[state.type])
|
||||
const data: DataType[] = [
|
||||
{
|
||||
title: 'xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统xxx系统',
|
||||
price: '100',
|
||||
reason: '没钱',
|
||||
img: 'xxxx-xxx.img',
|
||||
time: '2024-8-20 13:10',
|
||||
id: '1',
|
||||
examineTime: '2024-8-20 12:00',
|
||||
examineStatus: 'PASS',
|
||||
examineText: '额呵呵呵',
|
||||
},
|
||||
{
|
||||
title: 'xxx系统',
|
||||
price: '100',
|
||||
reason: '没钱',
|
||||
img: 'xxxx-xxx.img',
|
||||
time: '2024-8-20 13:10',
|
||||
id: '2',
|
||||
examineTime: '2024-8-20 12:00',
|
||||
examineStatus: 'NOPASS',
|
||||
examineText: '额呵呵呵',
|
||||
},
|
||||
{
|
||||
title: 'xxx系统',
|
||||
price: '100',
|
||||
reason: '没钱',
|
||||
img: 'xxxx-xxx.img',
|
||||
time: '2024-8-20 13:10',
|
||||
id: '3',
|
||||
examineTime: '2024-8-20 12:00',
|
||||
examineStatus: 'WAIT',
|
||||
examineText: '额呵呵呵',
|
||||
},
|
||||
{
|
||||
title: 'xxx系统',
|
||||
price: '100',
|
||||
reason: '没钱',
|
||||
img: 'xxxx-xxx.img',
|
||||
time: '2024-8-20 13:10',
|
||||
id: '4',
|
||||
examineTime: '2024-8-20 12:00',
|
||||
examineStatus: 'NOPASS',
|
||||
examineText: '额呵呵呵',
|
||||
},
|
||||
{
|
||||
title: 'xxx系统',
|
||||
price: '100',
|
||||
reason: '没钱',
|
||||
img: 'xxxx-xxx.img',
|
||||
time: '2024-8-20 13:10',
|
||||
id: '5',
|
||||
examineTime: '2024-8-20 12:00',
|
||||
examineStatus: 'PASS',
|
||||
examineText: '额呵呵呵',
|
||||
},
|
||||
{
|
||||
title: 'xxx系统',
|
||||
price: '100',
|
||||
reason: '没钱',
|
||||
img: 'xxxx-xxx.img',
|
||||
time: '2024-8-20 13:10',
|
||||
id: '6',
|
||||
examineTime: '2024-8-20 12:00',
|
||||
examineStatus: 'PASS',
|
||||
examineText: '额呵呵呵',
|
||||
},
|
||||
{
|
||||
title: 'xxx系统',
|
||||
price: '100',
|
||||
reason: '没钱',
|
||||
img: 'xxxx-xxx.img',
|
||||
time: '2024-8-20 13:10',
|
||||
id: '7',
|
||||
examineTime: '2024-8-20 12:00',
|
||||
examineStatus: 'PASS',
|
||||
examineText: '额呵呵呵',
|
||||
},
|
||||
{
|
||||
title: 'xxx系统',
|
||||
price: '100',
|
||||
reason: '没钱',
|
||||
img: 'xxxx-xxx.img',
|
||||
time: '2024-8-20 13:10',
|
||||
id: '8',
|
||||
examineTime: '2024-8-20 12:00',
|
||||
examineStatus: 'PASS',
|
||||
examineText: '额呵呵呵',
|
||||
},
|
||||
{
|
||||
title: 'xxx系统',
|
||||
price: '100',
|
||||
reason: '没钱',
|
||||
img: 'xxxx-xxx.img',
|
||||
time: '2024-8-20 13:10',
|
||||
id: '9',
|
||||
examineTime: '2024-8-20 12:00',
|
||||
examineStatus: 'PASS',
|
||||
examineText: '额呵呵呵',
|
||||
},
|
||||
{
|
||||
title: 'xxx系统',
|
||||
price: '100',
|
||||
reason: '没钱',
|
||||
img: 'xxxx-xxx.img',
|
||||
time: '2024-8-20 13:10',
|
||||
id: '10',
|
||||
examineTime: '2024-8-20 12:00',
|
||||
examineStatus: 'PASS',
|
||||
examineText: '额呵呵呵',
|
||||
},
|
||||
|
||||
|
||||
];
|
||||
|
||||
return (
|
||||
<div>
|
||||
{contextHolder}
|
||||
<div className='refun' style={{ height: `${height}px`, overflow: 'auto' }}>
|
||||
{/* {state.type} */}
|
||||
<Table columns={columns} dataSource={data}
|
||||
style={{
|
||||
// height: height - 80,
|
||||
// height: 620,
|
||||
// background: 'skyblue'
|
||||
}}
|
||||
// pagination={false} // 不显示分页
|
||||
pagination={
|
||||
{
|
||||
pageSize: 10,
|
||||
total: total,
|
||||
onChange: (currentPage) => {
|
||||
setPage(currentPage);
|
||||
getData(currentPage)
|
||||
},
|
||||
showSizeChanger: false,
|
||||
current: page
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
scroll={{ y: height - 128 }}
|
||||
rowKey="id"
|
||||
/>
|
||||
{/* <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: 15 ,width:'100%'}}>
|
||||
<Pagination defaultCurrent={page} total={total} pageSize={10} showSizeChanger={false} onChange={(page) => {
|
||||
setPage(page)
|
||||
// getData(page)
|
||||
}} />
|
||||
</div> */}
|
||||
</div>
|
||||
<Modal
|
||||
title="确认撤销"
|
||||
okText="撤销"
|
||||
cancelText="取消"
|
||||
destroyOnClose={true}
|
||||
open={revokeModal}
|
||||
onOk={() => {
|
||||
setRevokeModal(false)
|
||||
}}
|
||||
onCancel={() => {
|
||||
setRevokeModal(false)
|
||||
}}
|
||||
okButtonProps={{ style: { background: 'red', color: 'white' } }}
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
height: `${height}px`,
|
||||
}}>
|
||||
<div style={{ width: 384, display: 'flex', height: 50, alignItems: 'center' }}>
|
||||
<img src={revokeImg} alt="" style={{ width: 32, height: 32, marginLeft: 10 }} />
|
||||
<div style={{ marginLeft: 10, fontSize: 18 }}>
|
||||
是否撤销该条退款申请
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
}
|
21
src/route/Refun/refun.css
Normal file
21
src/route/Refun/refun.css
Normal file
@ -0,0 +1,21 @@
|
||||
.refun{
|
||||
margin-top: 18px;
|
||||
background-color: rgb(255, 255, 255);
|
||||
padding: 0px 20px 0px 20px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.ellipsis-text{
|
||||
white-space: nowrap; /* 防止文本换行 */
|
||||
overflow: hidden; /* 隐藏超出部分 */
|
||||
text-overflow: ellipsis; /* 用省略号代替超出部分 */
|
||||
cursor: pointer;
|
||||
}
|
||||
.refunBtn{
|
||||
color:#165EFF;
|
||||
cursor:pointer;
|
||||
|
||||
}
|
@ -3,8 +3,10 @@ import './index.css';
|
||||
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 MenuWithBottomButtom from '../../components/menu/MenuWithBottomButton.tsx'
|
||||
// import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
|
||||
// import ListProj from "../../components/list/ListProj.tsx";
|
||||
@ -22,7 +24,7 @@ import {
|
||||
ListAction,
|
||||
ListData,
|
||||
} from "../../context/IndexListContext.ts";
|
||||
|
||||
// import { getMenuActive } from '../../util/cache.ts'
|
||||
import {
|
||||
MenuFoldOutlined,
|
||||
ClearOutlined
|
||||
@ -42,6 +44,8 @@ const { Search } = Input;
|
||||
|
||||
|
||||
export default function Index() {
|
||||
// 是否可以点击所属者 (当点击了退款选项,所属者列表跟他不产生联系 不给他点)
|
||||
const [clickBelongpeople,setClickBelongpeople] = useState(true)
|
||||
// 选项数组
|
||||
const [tagArray, setTagArray] = useState([])
|
||||
// 获取标签
|
||||
@ -203,7 +207,7 @@ export default function Index() {
|
||||
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);
|
||||
item.active = true;
|
||||
setProjMenu({
|
||||
...projMenu
|
||||
@ -216,6 +220,40 @@ export default function Index() {
|
||||
})
|
||||
},
|
||||
|
||||
});
|
||||
const [refunModal, setRefunModal] = useState(false) //退款弹窗
|
||||
const [refundMenu, setRefundMenu] = useState<IMenuWithTopButton>({
|
||||
button: {
|
||||
name: '退款',
|
||||
handle() {
|
||||
// nav('/proj-create')
|
||||
setRefunModal(true)
|
||||
}
|
||||
},
|
||||
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);
|
||||
|
||||
item.active = true;
|
||||
setRefundMenu({
|
||||
...refundMenu
|
||||
})
|
||||
dispatch({
|
||||
type: IndexListDataType.PROJ,
|
||||
value: item.id,
|
||||
// keywords: ''
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
});
|
||||
// const [agentMenu, setAgentMenu] = useState<IMenuWithTopButton>({
|
||||
// button: {
|
||||
@ -307,7 +345,37 @@ export default function Index() {
|
||||
// })
|
||||
}
|
||||
})
|
||||
// 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>('首页')
|
||||
// 编辑项目路由名
|
||||
@ -325,7 +393,7 @@ export default function Index() {
|
||||
setNow('首页')
|
||||
// setPathArray([{ title: '首页' }])
|
||||
setShowSearchBox(true)
|
||||
|
||||
setClickBelongpeople(true)
|
||||
} else if (location.pathname.includes('/proj-create')) {
|
||||
setShowSearchBox(false)
|
||||
setNow('创建项目')
|
||||
@ -432,6 +500,12 @@ export default function Index() {
|
||||
|
||||
// setPathArray([{ title: '首页' }])
|
||||
// /config-mod-edit /product-release /transaction-order
|
||||
} else if (location.pathname.includes('/refun')) {
|
||||
setShowSearchBox(false)
|
||||
setNow('首页')
|
||||
setClickBelongpeople(false)
|
||||
// setNewname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '软件功能特点' }])
|
||||
}
|
||||
}, [location.pathname])
|
||||
useEffect(() => {
|
||||
@ -511,7 +585,10 @@ export default function Index() {
|
||||
// console.log('chargeAdditionals',chargeAdditionals);
|
||||
|
||||
}, [type, chargeAdditionals, keywords, tagDataId, authorId]);
|
||||
|
||||
// const [menuName,setMenuName] = useState<string | null>('')
|
||||
// useEffect(()=>{
|
||||
// setMenuName( getMenuActive())
|
||||
// },[getMenuActive()])
|
||||
const handleSearch = (value: string) => {
|
||||
// console.log(value);
|
||||
setKeywords(value)
|
||||
@ -565,6 +642,7 @@ export default function Index() {
|
||||
chargeAdditionals={chargeAdditionals ? chargeAdditionals : ""}
|
||||
tagDataId={tagDataId ? tagDataId : ""}
|
||||
authorId={authorId ? authorId : ""}
|
||||
// enableBelongpeople = {()=>{setClickBelongpeople(true)}}
|
||||
/>
|
||||
<div className='belongPeopleMenu'>
|
||||
<div className='belongPeopleMenu-title'>
|
||||
@ -576,6 +654,7 @@ export default function Index() {
|
||||
currentPageData.map((item: any) => {
|
||||
return (
|
||||
<div className='belongpeopleName' key={item.projOwnerId} onClick={() => {
|
||||
if(clickBelongpeople){
|
||||
if (authorId == item.projOwnerId) {
|
||||
setauthorId('')
|
||||
nav('/home', {
|
||||
@ -599,8 +678,20 @@ export default function Index() {
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
// 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' : '' }}
|
||||
style={{ background: authorId == item.projOwnerId && clickBelongpeople ? '#FF9F08' : '', color: authorId == item.projOwnerId && clickBelongpeople ? '#FFF' : '' }}
|
||||
title={item.name} // 添加 title 属性以显示完整文本
|
||||
>
|
||||
{item.name}
|
||||
@ -663,6 +754,17 @@ export default function Index() {
|
||||
list={buyMenu.list}
|
||||
handleListItem={buyMenu.handleListItem}
|
||||
/> */}
|
||||
{/* <MenuWithTopButton
|
||||
button={refundMenu.button}
|
||||
list={refundMenu.list}
|
||||
handleListItem={refundMenu.handleListItem}
|
||||
// disableBelongpeople = {()=>{setClickBelongpeople(false)}}
|
||||
// keywords={keywords}
|
||||
// type={type ? type : ""}
|
||||
// chargeAdditionals={chargeAdditionals ? chargeAdditionals : ""}
|
||||
// tagDataId={tagDataId ? tagDataId : ""}
|
||||
// authorId={authorId ? authorId : ""}
|
||||
/> */}
|
||||
</div>
|
||||
</div>
|
||||
<div className="right">
|
||||
@ -872,6 +974,19 @@ export default function Index() {
|
||||
</div>
|
||||
</IndexListDispatchContext.Provider>
|
||||
</IndexListContext.Provider>
|
||||
<Modal
|
||||
title="申请退款"
|
||||
destroyOnClose={true}
|
||||
open={refunModal}
|
||||
footer={null}
|
||||
onCancel={() => {
|
||||
setRefunModal(false)
|
||||
}}
|
||||
okButtonProps={{ style: { background: 'red', color: 'white' } }}
|
||||
width={592}
|
||||
>
|
||||
<RefunModal closeModal={() => { setRefunModal(false) }}></RefunModal>
|
||||
</Modal>
|
||||
</>
|
||||
)
|
||||
}
|
@ -636,7 +636,7 @@ export default function ProjConfigLoginpage(props: any) {
|
||||
cancelText="取消"
|
||||
destroyOnClose={true}
|
||||
open={selectImgModal}
|
||||
width={1070}
|
||||
width={1090}
|
||||
style={{ position: 'relative' }}
|
||||
onOk={() => {
|
||||
|
||||
@ -658,13 +658,13 @@ export default function ProjConfigLoginpage(props: any) {
|
||||
|
||||
>
|
||||
|
||||
<div style={{ height: `${height - 80}px`, overflow: 'auto', display: 'flex', justifyContent: 'flex-start', flexWrap: 'wrap', marginTop: 10, }}>
|
||||
<div style={{ height: `${height - 80}px`, overflow: 'auto', display: 'flex', justifyContent: 'space-between', flexWrap: 'wrap', marginTop: 10, }}>
|
||||
{
|
||||
loginpageArray.map((item) => {
|
||||
// const imgSrc = `${Axios.defaults?.baseURL}/route/file/v2/download/true/${item.previewImgs}`;
|
||||
return (
|
||||
<div key={item.loginpageId} className={item.loginpageId == modalId ? 'page-img-select page-img-selected' : 'page-img-select'}
|
||||
style={{ marginRight: '10px', marginBottom: '10px', height: 270 }}
|
||||
style={{ marginRight: '', marginBottom: '10px', height: 270 }}
|
||||
onClick={() => {
|
||||
setModalId(item.loginpageId)
|
||||
setModalImg(item.previewImgs)
|
||||
|
@ -289,7 +289,7 @@ export default function ProjEditStep1(props: any) {
|
||||
cancelText="取消"
|
||||
destroyOnClose={true}
|
||||
open={isPageImgModal}
|
||||
width={1070}
|
||||
width={1090}
|
||||
style={{ position: 'relative' }}
|
||||
onOk={() => {
|
||||
// console.log(codeTypePageId);
|
||||
@ -321,13 +321,13 @@ export default function ProjEditStep1(props: any) {
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
<div style={{ height: `${height - 80}px`, overflow: 'auto', display: 'flex', justifyContent: 'flex-start', flexWrap: 'wrap', marginTop: 10, }}>
|
||||
<div style={{ height: `${height - 80}px`, overflow: 'auto', display: 'flex', justifyContent: 'space-between', flexWrap: 'wrap', marginTop: 10, }}>
|
||||
{
|
||||
pageImgArray.map((item) => {
|
||||
// const imgSrc = `${Axios.defaults?.baseURL}/route/file/v2/download/true/${item.previewImgs}`;
|
||||
return (
|
||||
<div key={item.codeTypePageId} className={item.codeTypePageId == selectedId ? 'page-img-select page-img-selected' : 'page-img-select'}
|
||||
style={{ marginRight: '10px', marginBottom: '10px', height: 250 }}
|
||||
style={{ marginRight: '', marginBottom: '10px', height: 250 }}
|
||||
onClick={() => {
|
||||
setSelectedId(item.codeTypePageId)
|
||||
setSelectedImg(item.previewImgs)
|
||||
|
@ -4,7 +4,7 @@ import ProductRelease from '../route/ProductRelease/ProductRelease.tsx'
|
||||
import TransactionOrder from '../route/TransactionOrder/TransactionOrder.tsx'
|
||||
import CopyrightGgoods from '../route/CopyrightGgoods/CopyrightGgoods.tsx'
|
||||
import TradingGoods from '../route/TradingGoods/TradingGoods.tsx'
|
||||
|
||||
import Refun from '../route/Refun/Refun.tsx'
|
||||
|
||||
import Index from "../route/index/Index.tsx";
|
||||
// import Search from "../route/SearchList/SearchList.tsx";
|
||||
@ -223,6 +223,10 @@ export const router = createHashRouter(
|
||||
path:'/trading-goods',
|
||||
element:<TradingGoods/>
|
||||
},
|
||||
{
|
||||
path:'/refun',
|
||||
element:<Refun/>
|
||||
},
|
||||
{
|
||||
path: '/proj-create',
|
||||
element: <ProjCreate />
|
||||
|
BIN
src/static/refun.png
Normal file
BIN
src/static/refun.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
src/static/revoke.png
Normal file
BIN
src/static/revoke.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Loading…
Reference in New Issue
Block a user