邀请码功能
This commit is contained in:
parent
ac8ce23fe6
commit
7d025b74ee
326
src/components/CapitalModal/CapitalModal.tsx
Normal file
326
src/components/CapitalModal/CapitalModal.tsx
Normal file
@ -0,0 +1,326 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { get } from '../../util/AjaxUtils'
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
import { Table, Tag, Spin, Input, DatePicker, Button, Tooltip } from 'antd';
|
||||
import { SearchOutlined, ClearOutlined } from '@ant-design/icons';
|
||||
import type { TableProps, DatePickerProps } from 'antd';
|
||||
// import dayjs, { } from 'dayjs';
|
||||
import locale from 'antd/es/date-picker/locale/zh_CN';
|
||||
|
||||
export default function CapitalModal() {
|
||||
// const dateFormat = 'YYYY年MM月DD日';
|
||||
const [messageApi, messageContext] = useMessage();
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
const [page, setPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [newkeywords, setnewkeywords] = useState('')//临时过度
|
||||
const [keywords, setkeywords] = useState('')
|
||||
const [newstartTime, setnewstartTime] = useState<any>()//临时过度
|
||||
const [showStartTime,setShowStartTime] = useState<any>()
|
||||
const [startTime, setstartTime] = useState<any>()
|
||||
const [newendTime, setnewendTime] = useState<any>() //临时过度
|
||||
const [showEndTime,setShowEndTime] = useState<any>()
|
||||
const [endTime, setendTime] = useState<any>()
|
||||
const [tableData, setTableData] = useState<any[]>()
|
||||
|
||||
// 更改开始日期
|
||||
const startTimeChange: DatePickerProps['onChange'] = (date,dateString) => {
|
||||
// const time = dayjs(date).format(dateFormat)
|
||||
setShowStartTime(date)
|
||||
setnewstartTime(dateString)
|
||||
|
||||
|
||||
};
|
||||
const endTimeChange: DatePickerProps['onChange'] = (date,dateString) => {
|
||||
// console.log(date, dateString);
|
||||
setShowEndTime(date)
|
||||
setnewendTime(dateString)
|
||||
// dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat),
|
||||
// console.log('日期', dayjs(date).format(dateFormat));
|
||||
|
||||
};
|
||||
// 点击搜索
|
||||
const onSearch = () => {
|
||||
console.log(newstartTime);
|
||||
|
||||
|
||||
setPage(1)
|
||||
setkeywords(newkeywords)
|
||||
setstartTime(newstartTime)
|
||||
setnewendTime(newendTime)
|
||||
get({
|
||||
messageApi,
|
||||
url: '/api/account/listpage-item/self',
|
||||
config: {
|
||||
// dayjs(data.projDevCompleteDate, 'YYYY-MM-DD')
|
||||
params: {
|
||||
|
||||
keywords: newkeywords ? newkeywords : '',
|
||||
startTime: newstartTime ? newstartTime: '',
|
||||
endTime: newendTime ? newendTime : '',
|
||||
page: 1,
|
||||
rows: 10
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
setIsLoading(true);
|
||||
},
|
||||
onSuccess(data: any) {
|
||||
console.log(page);
|
||||
|
||||
setTableData(data.data.rows)
|
||||
// console.log(data.data);
|
||||
setTotal(data.data.total)
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
setIsLoading(false);
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化搜索条件及分页
|
||||
const init = () => {
|
||||
setShowEndTime(undefined)
|
||||
setShowStartTime(undefined)
|
||||
setPage(1)
|
||||
setkeywords('')
|
||||
setnewkeywords('')
|
||||
setstartTime('')
|
||||
setnewstartTime('')
|
||||
setendTime('')
|
||||
setnewendTime('')
|
||||
get({
|
||||
messageApi,
|
||||
url: '/api/account/listpage-item/self',
|
||||
config: {
|
||||
params: {
|
||||
keywords: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
page: 1,
|
||||
rows: 10
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
setIsLoading(true);
|
||||
},
|
||||
onSuccess(data: any) {
|
||||
setTableData(data.data.rows)
|
||||
// console.log(data.data);
|
||||
setTotal(data.data.total)
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
setIsLoading(false);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const getData = () => {
|
||||
get({
|
||||
messageApi,
|
||||
url: '/api/account/listpage-item/self',
|
||||
config: {
|
||||
// dayjs(date).format(dateFormat)
|
||||
params: {
|
||||
keywords: keywords ? keywords : '',
|
||||
startTime: startTime ? startTime : '',
|
||||
endTime: endTime ? endTime : '',
|
||||
page: page,
|
||||
rows: 10
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
setIsLoading(true);
|
||||
},
|
||||
onSuccess(data: any) {
|
||||
setTableData(data.data.rows)
|
||||
console.log(data.data);
|
||||
setTotal(data.data.total)
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
setIsLoading(false);
|
||||
}
|
||||
})
|
||||
}
|
||||
useEffect(() => {
|
||||
getData()
|
||||
}, [page])
|
||||
interface DataType {
|
||||
index?: number;
|
||||
type: number;
|
||||
// 交易前金额
|
||||
accountBeforeMoneyDouble: string;
|
||||
// 交易金额
|
||||
accountMoneyDouble: string;
|
||||
// 余额
|
||||
accountAfterMoneyDouble: string;
|
||||
// 关联订单编号
|
||||
orderId: string;
|
||||
// 关联订单类型
|
||||
orderType: string;
|
||||
// 交易时间
|
||||
gmtCreate: string;
|
||||
// 描述
|
||||
description: string;
|
||||
}
|
||||
|
||||
const columns: TableProps<DataType>['columns'] = [
|
||||
{
|
||||
title: () => <div style={{ textAlign: 'center' }}>序号</div>,
|
||||
dataIndex: 'index',
|
||||
width: 70, // 设置宽度
|
||||
key: 'index',
|
||||
render: (text, record, index) => (page - 1) * 10 + index + 1,
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>类型</div>,
|
||||
key: 'type',
|
||||
width: 100, // 设置宽度
|
||||
dataIndex: 'type',
|
||||
render: (text) => {
|
||||
const tagProps =
|
||||
text === 1 ? { color: '#f50', label: '充值' } :
|
||||
text === 2 ? { color: '#2db7f5', label: '支出' } :
|
||||
text === 3 ? { color: '#87d068', label: '提现' } :
|
||||
text === 4 ? { color: '#108ee9', label: '系统扣款' } :
|
||||
text === 5 ? { color: '#10e98f', label: '订单收入' } :
|
||||
{ color: '#d9d9d9', label: '未知' }; // 默认值
|
||||
return <Tag color={tagProps.color}>{tagProps.label}</Tag>;
|
||||
}
|
||||
,
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>交易前金额</div>,
|
||||
width: 120,
|
||||
dataIndex: 'accountBeforeMoneyDouble',
|
||||
key: 'accountBeforeMoneyDouble',
|
||||
render:(text) => (
|
||||
<div style={{fontWeight:700}}>{text}</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>交易金额</div>,
|
||||
width: 120,
|
||||
dataIndex: 'accountMoneyDouble',
|
||||
key: 'accountMoneyDouble',
|
||||
render:(text) => (
|
||||
<div style={{fontWeight:700}}>{text}</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>交易后余额</div>,
|
||||
width: 120,
|
||||
dataIndex: 'accountAfterMoneyDouble',
|
||||
key: 'accountAfterMoneyDouble',
|
||||
render:(text) => (
|
||||
<div style={{fontWeight:700}}>{text}</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>关联订单编号</div>,
|
||||
dataIndex: 'orderId',
|
||||
// fixed: 'right',
|
||||
width: 300,
|
||||
key: 'orderId',
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>关联订单类型</div>,
|
||||
dataIndex: 'orderType',
|
||||
key: 'orderType',
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>交易时间</div>,
|
||||
dataIndex: 'gmtCreate',
|
||||
key: 'gmtCreate',
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>描述</div>,
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (text) => {
|
||||
return <Tooltip placement="top" title={text}>{text}</Tooltip>
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div>
|
||||
{messageContext}
|
||||
<Spin tip="加载中..." spinning={isLoading}>
|
||||
<div style={{ marginBottom: 10 }}>
|
||||
<Input placeholder="请输入关键字" value={newkeywords} onChange={(e) => {
|
||||
setnewkeywords(e.target.value)
|
||||
}}
|
||||
style={{ width: 198, height: 36, marginRight: 12 }}
|
||||
></Input>
|
||||
<DatePicker placeholder="开始时间"
|
||||
style={{ width: 198, height: 36, marginRight: 12 }}
|
||||
locale={locale}
|
||||
onChange={startTimeChange}
|
||||
value={showStartTime}
|
||||
/>
|
||||
<DatePicker placeholder="结束时间"
|
||||
style={{ width: 198, height: 36, marginRight: 12 }}
|
||||
locale={locale}
|
||||
onChange={endTimeChange}
|
||||
value={showEndTime}
|
||||
/>
|
||||
<Button type="primary"
|
||||
style={{
|
||||
height: 36,
|
||||
// backgroundColor: '#FF9F08'
|
||||
}}
|
||||
onClick={() => {
|
||||
onSearch()
|
||||
}}
|
||||
icon={<SearchOutlined />}>
|
||||
搜索
|
||||
</Button>
|
||||
<Button
|
||||
style={{
|
||||
height: 36,
|
||||
marginLeft: 10,
|
||||
// backgroundColor: '#FF9F08'
|
||||
}}
|
||||
icon={<ClearOutlined />}
|
||||
onClick={() => {
|
||||
init()
|
||||
}}
|
||||
>
|
||||
清除
|
||||
</Button>
|
||||
</div>
|
||||
<Table columns={columns} dataSource={tableData}
|
||||
style={{ textAlign: 'center' }} // 设置表格内容居中显示
|
||||
pagination={
|
||||
{
|
||||
pageSize: 10,
|
||||
total: total,
|
||||
onChange: (currentPage) => {
|
||||
setPage(currentPage);
|
||||
},
|
||||
showSizeChanger: false,
|
||||
current: page
|
||||
|
||||
}
|
||||
}
|
||||
scroll={{ y: 500 }}
|
||||
bordered
|
||||
key="dataTable" rowKey="orderId"
|
||||
/>
|
||||
{/* <div className='product-release-pagination'>
|
||||
<Pagination defaultCurrent={page} total={total} defaultPageSize={10} onChange={(page) => {
|
||||
setPage(page)
|
||||
}} />
|
||||
</div> */}
|
||||
</Spin>
|
||||
</div>
|
||||
)
|
||||
}
|
248
src/components/RecordModal/RecordModal.tsx
Normal file
248
src/components/RecordModal/RecordModal.tsx
Normal file
@ -0,0 +1,248 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { get } from '../../util/AjaxUtils'
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
import { Table, Spin, DatePicker, Button,Tooltip } from 'antd';
|
||||
import { SearchOutlined, ClearOutlined } from '@ant-design/icons';
|
||||
import type { TableProps, DatePickerProps } from 'antd';
|
||||
// import dayjs, { } from 'dayjs';
|
||||
import locale from 'antd/es/date-picker/locale/zh_CN';
|
||||
|
||||
export default function RecordModal() {
|
||||
// const dateFormat = 'YYYY年MM月DD日';
|
||||
const [messageApi, messageContext] = useMessage();
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
const [page, setPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [newstartTime, setnewstartTime] = useState<any>()//临时过度
|
||||
const [showStartTime, setShowStartTime] = useState<any>()
|
||||
const [startTime, setstartTime] = useState<any>()
|
||||
const [newendTime, setnewendTime] = useState<any>() //临时过度
|
||||
const [showEndTime, setShowEndTime] = useState<any>()
|
||||
const [endTime, setendTime] = useState<any>()
|
||||
const [tableData, setTableData] = useState<any[]>()
|
||||
|
||||
// 更改开始日期
|
||||
const startTimeChange: DatePickerProps['onChange'] = (date, dateString) => {
|
||||
// const time = dayjs(date).format(dateFormat)
|
||||
setShowStartTime(date)
|
||||
setnewstartTime(dateString)
|
||||
|
||||
|
||||
};
|
||||
const endTimeChange: DatePickerProps['onChange'] = (date, dateString) => {
|
||||
// console.log(date, dateString);
|
||||
setShowEndTime(date)
|
||||
setnewendTime(dateString)
|
||||
// dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat),
|
||||
// console.log('日期', dayjs(date).format(dateFormat));
|
||||
|
||||
};
|
||||
// 点击搜索
|
||||
const onSearch = () => {
|
||||
console.log(newstartTime);
|
||||
setPage(1)
|
||||
setstartTime(newstartTime)
|
||||
setnewendTime(newendTime)
|
||||
get({
|
||||
messageApi,
|
||||
url: '/api/payment/split/listpage/self',
|
||||
config: {
|
||||
// dayjs(data.projDevCompleteDate, 'YYYY-MM-DD')
|
||||
params: {
|
||||
startTime: newstartTime ? newstartTime : '',
|
||||
endTime: newendTime ? newendTime : '',
|
||||
page: 1,
|
||||
rows: 10
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
setIsLoading(true);
|
||||
},
|
||||
onSuccess(data: any) {
|
||||
console.log(page);
|
||||
|
||||
setTableData(data.data.rows)
|
||||
// console.log(data.data);
|
||||
setTotal(data.data.total)
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
setIsLoading(false);
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化搜索条件及分页
|
||||
const init = () => {
|
||||
setShowEndTime(undefined)
|
||||
setShowStartTime(undefined)
|
||||
setPage(1)
|
||||
setstartTime('')
|
||||
setnewstartTime('')
|
||||
setendTime('')
|
||||
setnewendTime('')
|
||||
get({
|
||||
messageApi,
|
||||
url: '/api/payment/split/listpage/self',
|
||||
config: {
|
||||
params: {
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
page: 1,
|
||||
rows: 10
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
setIsLoading(true);
|
||||
},
|
||||
onSuccess(data: any) {
|
||||
setTableData(data.data.rows)
|
||||
// console.log(data.data);
|
||||
setTotal(data.data.total)
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
setIsLoading(false);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const getData = () => {
|
||||
get({
|
||||
messageApi,
|
||||
url: '/api/payment/split/listpage/self',
|
||||
config: {
|
||||
// dayjs(date).format(dateFormat)
|
||||
params: {
|
||||
startTime: startTime ? startTime : '',
|
||||
endTime: endTime ? endTime : '',
|
||||
page: page,
|
||||
rows: 10
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
setIsLoading(true);
|
||||
},
|
||||
onSuccess(data: any) {
|
||||
setTableData(data.data.rows)
|
||||
console.log(data.data);
|
||||
setTotal(data.data.total)
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
setIsLoading(false);
|
||||
}
|
||||
})
|
||||
}
|
||||
useEffect(() => {
|
||||
getData()
|
||||
}, [page])
|
||||
interface DataType {
|
||||
index?: number;
|
||||
// 金额
|
||||
amount: number;
|
||||
// 备注
|
||||
notes: string
|
||||
}
|
||||
|
||||
const columns: TableProps<DataType>['columns'] = [
|
||||
{
|
||||
title: () => <div style={{ textAlign: 'center' }}>序号</div>,
|
||||
dataIndex: 'index',
|
||||
width: 70, // 设置宽度
|
||||
key: 'index',
|
||||
render: (text, record, index) => (page - 1) * 10 + index + 1,
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>金额</div>,
|
||||
width: 120,
|
||||
dataIndex: 'amount',
|
||||
key: 'amount',
|
||||
render:(text) => (
|
||||
<div style={{fontWeight:700}}>{text}</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>备注</div>,
|
||||
|
||||
dataIndex: 'notes',
|
||||
key: 'notes',
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (text) => {
|
||||
return <Tooltip placement="top" title={text}>{text}</Tooltip>
|
||||
}
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
return (
|
||||
<div>
|
||||
{messageContext}
|
||||
<Spin tip="加载中..." spinning={isLoading}>
|
||||
<div style={{ marginBottom: 10 }}>
|
||||
<DatePicker placeholder="开始时间"
|
||||
style={{ width: 198, height: 36, marginRight: 12 }}
|
||||
locale={locale}
|
||||
onChange={startTimeChange}
|
||||
value={showStartTime}
|
||||
/>
|
||||
<DatePicker placeholder="结束时间"
|
||||
style={{ width: 198, height: 36, marginRight: 12 }}
|
||||
locale={locale}
|
||||
onChange={endTimeChange}
|
||||
value={showEndTime}
|
||||
/>
|
||||
<Button type="primary"
|
||||
style={{
|
||||
height: 36,
|
||||
// backgroundColor: '#FF9F08'
|
||||
}}
|
||||
onClick={() => {
|
||||
onSearch()
|
||||
}}
|
||||
icon={<SearchOutlined />}>
|
||||
搜索
|
||||
</Button>
|
||||
<Button
|
||||
style={{
|
||||
height: 36,
|
||||
marginLeft: 10,
|
||||
// backgroundColor: '#FF9F08'
|
||||
}}
|
||||
icon={<ClearOutlined />}
|
||||
onClick={() => {
|
||||
init()
|
||||
}}
|
||||
>
|
||||
清除
|
||||
</Button>
|
||||
</div>
|
||||
<Table columns={columns} dataSource={tableData}
|
||||
style={{ textAlign: 'center' }} // 设置表格内容居中显示
|
||||
pagination={
|
||||
{
|
||||
pageSize: 10,
|
||||
total: total,
|
||||
onChange: (currentPage) => {
|
||||
setPage(currentPage);
|
||||
},
|
||||
showSizeChanger: false,
|
||||
current: page
|
||||
|
||||
}
|
||||
}
|
||||
scroll={{ y: 500 }}
|
||||
bordered
|
||||
key="dataTable" rowKey="paymentSplitId"
|
||||
/>
|
||||
{/* <div className='product-release-pagination'>
|
||||
<Pagination defaultCurrent={page} total={total} defaultPageSize={10} onChange={(page) => {
|
||||
setPage(page)
|
||||
}} />
|
||||
</div> */}
|
||||
</Spin>
|
||||
</div>
|
||||
)
|
||||
}
|
@ -619,13 +619,13 @@ export default function AiHelper(props: PropsType) {
|
||||
const imgSrc = `${Axios.defaults?.baseURL}/route/file/v2/download/true/${item.previewImgs}`;
|
||||
return (
|
||||
<div key={item.loginpageId} className={item.loginpageId == loginpageId ? 'page-img-select page-img-selected' : 'page-img-select'}
|
||||
style={{ marginRight: '10px', marginBottom: '10px', width: 265,height:150,borderRadius:15}}
|
||||
style={{ marginRight: '10px', marginBottom: '10px', width: 265, height: 150, borderRadius: 15 }}
|
||||
onClick={() => {
|
||||
setloginpageId(item.loginpageId)
|
||||
put({
|
||||
messageApi,
|
||||
url: `/api/proj/update-loginpage-id/proj-id/${props.projId}/loginpage-id/${item.loginpageId}`,
|
||||
|
||||
|
||||
|
||||
onSuccess() {
|
||||
messageApi.open({
|
||||
@ -646,14 +646,14 @@ export default function AiHelper(props: PropsType) {
|
||||
<Image
|
||||
src={imgSrc}
|
||||
preview={false} width={265} height={150}
|
||||
style={{borderRadius:15}} />
|
||||
style={{ borderRadius: 15 }} />
|
||||
</div>
|
||||
<div className="page-title">
|
||||
<div className="checkbox"></div>
|
||||
{/* <div className="text">{props.title ? props.title : '标题'}</div> */}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
)
|
||||
})
|
||||
@ -662,12 +662,14 @@ export default function AiHelper(props: PropsType) {
|
||||
</div>
|
||||
<div className='pagination'>
|
||||
{/* defaultCurrent: 默认当前页数 total:数据总数 defaultPageSize:'页面显示几条' */}
|
||||
<Pagination defaultCurrent={1} total={total} defaultPageSize={10} onChange={(page) => {
|
||||
// console.log(page);
|
||||
// setPage(page)
|
||||
setloginpageArray([])
|
||||
getlistLoginpage(page)
|
||||
}} />
|
||||
<Pagination
|
||||
showSizeChanger={false}
|
||||
defaultCurrent={1} total={total} defaultPageSize={10} onChange={(page) => {
|
||||
// console.log(page);
|
||||
// setPage(page)
|
||||
setloginpageArray([])
|
||||
getlistLoginpage(page)
|
||||
}} />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -679,7 +681,7 @@ export default function AiHelper(props: PropsType) {
|
||||
const imgSrc = `${Axios.defaults?.baseURL}/route/file/v2/download/true/${item.previewImgs}`;
|
||||
return (
|
||||
<div key={item.loginpageId} className={item.codeTypePageId == codeTypePageId ? 'page-img-select page-img-selected' : 'page-img-select'}
|
||||
style={{ marginRight: '10px', marginBottom: '10px', width: 265, height: 135,borderRadius:15 }}
|
||||
style={{ marginRight: '10px', marginBottom: '10px', width: 265, height: 135, borderRadius: 15 }}
|
||||
onClick={() => {
|
||||
// setSelectedId(item.codeTypePageId)
|
||||
// setSelectedImg(item.previewImgs)
|
||||
@ -705,7 +707,7 @@ export default function AiHelper(props: PropsType) {
|
||||
<div className="page-img" >
|
||||
<Image
|
||||
src={imgSrc}
|
||||
preview={false} width={265} height={135} style={{borderRadius:15}} />
|
||||
preview={false} width={265} height={135} style={{ borderRadius: 15 }} />
|
||||
</div>
|
||||
<div className="page-title">
|
||||
<div className="checkbox"></div>
|
||||
@ -719,12 +721,14 @@ export default function AiHelper(props: PropsType) {
|
||||
</div>
|
||||
<div className='pagination'>
|
||||
{/* defaultCurrent: 默认当前页数 total:数据总数 defaultPageSize:'页面显示几条' */}
|
||||
<Pagination defaultCurrent={1} total={pageTotal} defaultPageSize={10} onChange={(page) => {
|
||||
console.log(page);
|
||||
// setPage(page)
|
||||
setpageImgArray([])
|
||||
getPageImgData(page)
|
||||
}} />
|
||||
<Pagination
|
||||
showSizeChanger={false}
|
||||
defaultCurrent={1} total={pageTotal} defaultPageSize={10} onChange={(page) => {
|
||||
console.log(page);
|
||||
// setPage(page)
|
||||
setpageImgArray([])
|
||||
getPageImgData(page)
|
||||
}} />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1,20 +1,107 @@
|
||||
import './balance-head.css'
|
||||
import {useContext} from "react";
|
||||
import {GlobalContext} from "../../context/GlobalContext.ts";
|
||||
import { useContext, useState } from "react";
|
||||
import { GlobalContext } from "../../context/GlobalContext.ts";
|
||||
import { Modal } from 'antd';
|
||||
import moneyImg from '../../static/head/money.png'
|
||||
import CapitalModal from '../CapitalModal/CapitalModal.tsx';
|
||||
import RecordModal from '../RecordModal/RecordModal.tsx'
|
||||
import capitalImg from '../../static/capita.png'
|
||||
import recordImg from '../../static/record.png'
|
||||
export default function BalanceHead() {
|
||||
const globalContext = useContext(GlobalContext);
|
||||
// const [isLoading, setIsLoading] = useState(false)
|
||||
// const [moneyModal, setMoneyModal] = useState(false)
|
||||
// 资金流水弹窗
|
||||
const [capitalModal, setCapitalModal] = useState(false)
|
||||
// 分账记录弹窗
|
||||
const [recordModal, setRecordModal] = useState(false)
|
||||
|
||||
return (
|
||||
<div className="head-item balance-head">
|
||||
return (
|
||||
<div className="head-item balance-head">
|
||||
<div className="label">
|
||||
<img src={moneyImg} alt="" />
|
||||
<div>余额</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div className="balance" onClick={() => {
|
||||
// console.log('查看余额')
|
||||
}}>¥{globalContext.user.balance}</div>
|
||||
</div>
|
||||
// setMoneyModal(true)
|
||||
}}>¥{globalContext.user.balance}
|
||||
<div className='transparentBox'></div>
|
||||
<div className='moneyModal'>
|
||||
<div className='moneyModal-box'>
|
||||
<div className='moneyModal-triangle'></div>
|
||||
<div className='moneyModal-title' onClick={()=>{
|
||||
setCapitalModal(true)
|
||||
}}>
|
||||
<img src={capitalImg} style={{marginTop:1}} width={15} height={20} alt="" />
|
||||
<div style={{
|
||||
marginLeft:10,
|
||||
}}>
|
||||
资金流水
|
||||
</div>
|
||||
</div>
|
||||
<div style={{
|
||||
width: 68,
|
||||
height: 1,
|
||||
background: '#EAEAEA',
|
||||
marginLeft:18
|
||||
}}></div>
|
||||
<div className='moneyModal-title' onClick={()=>{
|
||||
setRecordModal(true)
|
||||
}}>
|
||||
<img src={recordImg} style={{marginTop:1}} width={20} height={20} alt="" />
|
||||
<div style={{
|
||||
marginLeft:5,
|
||||
}}>
|
||||
分账记录
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* <Modal title="流水和分账"
|
||||
footer={null}
|
||||
destroyOnClose
|
||||
open={moneyModal}
|
||||
// width={1500}
|
||||
onCancel={() => {
|
||||
setMoneyModal(false)
|
||||
|
||||
}}>
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
setCapitalModal(true)
|
||||
}}>资金流水</div>
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
setRecordModal(true)
|
||||
}}>分账记录</div>
|
||||
</Modal> */}
|
||||
<Modal title="资金流水"
|
||||
footer={null}
|
||||
destroyOnClose
|
||||
open={capitalModal}
|
||||
width={1500}
|
||||
onCancel={() => {
|
||||
setCapitalModal(false)
|
||||
|
||||
}}>
|
||||
|
||||
<CapitalModal></CapitalModal>
|
||||
|
||||
</Modal>
|
||||
<Modal title="分账记录"
|
||||
footer={null}
|
||||
destroyOnClose
|
||||
open={recordModal}
|
||||
width={1200}
|
||||
onCancel={() => {
|
||||
setRecordModal(false)
|
||||
|
||||
}}>
|
||||
|
||||
<RecordModal></RecordModal>
|
||||
|
||||
</Modal>
|
||||
</div >
|
||||
)
|
||||
}
|
@ -7,7 +7,8 @@
|
||||
display: flex;
|
||||
|
||||
}
|
||||
.balance-head .label img{
|
||||
|
||||
.balance-head .label img {
|
||||
width: 17px;
|
||||
height: 19px;
|
||||
margin-right: 5px;
|
||||
@ -17,4 +18,63 @@
|
||||
font-size: 18px;
|
||||
color: #f78e4c;
|
||||
margin-top: 8px;
|
||||
cursor: pointer;
|
||||
/* background-color: pink; */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.moneyModal {
|
||||
display: none;
|
||||
background-color: #ffffff;
|
||||
position: absolute;
|
||||
width: 120px;
|
||||
height: 100px;
|
||||
left: -50px;
|
||||
top: 40px;
|
||||
/* border: 1px solid red; */
|
||||
box-shadow: 0px 5px 6px 5px rgba(0, 0, 0, 0.03);
|
||||
/* border-radius: 10px; */
|
||||
/* font-size: 22px; */
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.moneyModal-box {
|
||||
width: 120px;
|
||||
height: 100px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
.moneyModal-triangle{
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
/* left: calc(50% - 5px); */
|
||||
left: 110px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 0px solid transparent;
|
||||
border-bottom: 10px solid #ffffff; /* 87px 是一个正三角形的高度 */
|
||||
}
|
||||
.balance-head .balance:hover .moneyModal {
|
||||
/* cursor: pointer */
|
||||
display: block;
|
||||
}
|
||||
|
||||
.moneyModal-title {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: 400;
|
||||
}
|
||||
.transparentBox{
|
||||
background-color: transparent;
|
||||
/* background-color: pink; */
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 20px;
|
||||
/* left: -50px; */
|
||||
}
|
@ -170,6 +170,7 @@ export default function InvoiceInfoList(props: ListProps) {
|
||||
{
|
||||
pageSize: 20,
|
||||
total: total,
|
||||
showSizeChanger: false,
|
||||
onChange: (currentPage) => {
|
||||
setPage(currentPage);
|
||||
}
|
||||
|
@ -152,9 +152,11 @@ export default function InvoiceInfoSelectedList(props: ListProps) {
|
||||
{
|
||||
pageSize: 20,
|
||||
total: total,
|
||||
showSizeChanger: false,
|
||||
onChange: (currentPage) => {
|
||||
setPage(currentPage);
|
||||
}
|
||||
|
||||
}
|
||||
} scroll={{y: 500}} bordered key="dataTable" rowKey="orderId"/>
|
||||
</div>
|
||||
|
@ -41,6 +41,7 @@ export default function ListProj() {
|
||||
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
const [page, setPage] = useState(1);
|
||||
// const [pageSize,setPageSize] = useState(10)
|
||||
const [showPage, setShowPage] = useState(true);
|
||||
|
||||
const [total, setTotal] = useState(0);
|
||||
@ -75,7 +76,7 @@ export default function ListProj() {
|
||||
onSuccess({ data }) {
|
||||
// console.log('数据', data);
|
||||
// console.log('得到数据');
|
||||
|
||||
|
||||
setPage(data.page);
|
||||
setTotal(data.total);
|
||||
setProjs(data.rows);
|
||||
@ -118,11 +119,11 @@ export default function ListProj() {
|
||||
}
|
||||
})
|
||||
}
|
||||
useEffect(()=>{
|
||||
useEffect(() => {
|
||||
getTag()
|
||||
// console.log('这啥啊',indexListContext.categoryChangeCount);
|
||||
// console.log('这啥啊2',indexListContext.category)
|
||||
},[])
|
||||
}, [])
|
||||
// 更新数据
|
||||
// const upreqData = () => {
|
||||
// get<IListPage<IProj>>({
|
||||
@ -200,8 +201,8 @@ export default function ListProj() {
|
||||
setTimeout(() => {
|
||||
setShowPage(true)
|
||||
}, 0);
|
||||
|
||||
|
||||
|
||||
|
||||
}, [indexListContext.status, keywords, type, chargeAdditionals, tagDataId, authorId])
|
||||
|
||||
useEffect(() => {
|
||||
@ -214,7 +215,7 @@ export default function ListProj() {
|
||||
// alert(1)
|
||||
// console.log('什么玩意',indexListContext.categoryChangeCount);
|
||||
// console.log('什么玩意',indexListContext.category);
|
||||
|
||||
|
||||
}, [indexListContext.categoryChangeCount, indexListContext.category])
|
||||
|
||||
// const renderStatus = () => {
|
||||
@ -242,7 +243,14 @@ export default function ListProj() {
|
||||
{/* defaultCurrent: 默认当前页数 total:数据总数 */}
|
||||
{showPage ? <Pagination defaultCurrent={page} total={total} defaultPageSize={10} onChange={(page) => {
|
||||
reqData(page);
|
||||
}} /> : null}
|
||||
}}
|
||||
showSizeChanger={false} // 隐藏每页条数选择器
|
||||
// onShowSizeChange={(current, size) => {
|
||||
// // 处理每页条数的变化
|
||||
// setPageSize(size);
|
||||
// reqData(current, size);
|
||||
// }}
|
||||
/> : null}
|
||||
</div>
|
||||
</Spin>
|
||||
</div>
|
||||
|
176
src/components/myOrder/MyOrder.tsx
Normal file
176
src/components/myOrder/MyOrder.tsx
Normal file
@ -0,0 +1,176 @@
|
||||
import React from 'react'
|
||||
import { Table, TableProps, Tooltip, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
import { get } from "../../util/AjaxUtils";
|
||||
import './myorder.css'
|
||||
type IListPage<T> = {
|
||||
page: number;
|
||||
total: number;
|
||||
rows: T[]
|
||||
}
|
||||
type DetailDataType = {
|
||||
productType: string;
|
||||
quantity: number;
|
||||
unitPrice: number;
|
||||
notes: string;
|
||||
productDescription: string;
|
||||
}
|
||||
type DataType = {
|
||||
orderId: string;
|
||||
orderNo: string;
|
||||
totalAmount: number;
|
||||
detail: DetailDataType;
|
||||
orderStatus: string;
|
||||
gmtCreate: string;
|
||||
}
|
||||
export default function MyOrder() {
|
||||
const [messageApi, messageContext] = useMessage();
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
const [page, setPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [dataArray, setDataArray] = useState<DataType[]>([]);
|
||||
const getData = () => {
|
||||
get<IListPage<DataType>>({
|
||||
messageApi,
|
||||
url: '/api/order/listpage/complete/no-invoiced/self',
|
||||
config: {
|
||||
params: {
|
||||
page: page,
|
||||
rows: 20
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
setIsLoading(true);
|
||||
},
|
||||
onSuccess({ data }) {
|
||||
// console.log(data);
|
||||
|
||||
setPage(data.page);
|
||||
setTotal(data.total);
|
||||
setDataArray(data.rows);
|
||||
},
|
||||
onFinally() {
|
||||
setIsLoading(false);
|
||||
}
|
||||
})
|
||||
}
|
||||
const columns: TableProps<DataType>['columns'] = [
|
||||
{
|
||||
title: '订单号',
|
||||
dataIndex: 'orderNo',
|
||||
align: 'center',
|
||||
width: 250,
|
||||
fixed: 'left'
|
||||
},
|
||||
{
|
||||
title: '总金额',
|
||||
dataIndex: 'totalAmount',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
fixed: 'left',
|
||||
render: (value) => {
|
||||
return (value / 100).toFixed(2)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '订单状态',
|
||||
dataIndex: 'orderStatus',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
render: (value) => {
|
||||
if (value === 'COMPLETE') {
|
||||
return '完成';
|
||||
}
|
||||
if (value === 'CHARGEBACK') {
|
||||
return '已退款';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'gmtCreate',
|
||||
align: 'center',
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: '产品类型',
|
||||
dataIndex: 'detail.productType',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
render: (_value, record) => {
|
||||
if (record.detail.productType === 'PROJ') {
|
||||
return '项目创建'
|
||||
}
|
||||
if (record.detail.productType === 'AGENT') {
|
||||
return '项目代理'
|
||||
}
|
||||
return record.detail.productType
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '数量',
|
||||
dataIndex: 'detail.quantity',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
render: (_value, record) => {
|
||||
return record.detail.quantity
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '单价',
|
||||
dataIndex: 'detail.unitPrice',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
render: (_value, record) => {
|
||||
return (record.detail.unitPrice / 100).toFixed(2)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '订单备注',
|
||||
dataIndex: 'detail.notes',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
render: (_value, record) => {
|
||||
return record.detail.notes
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
dataIndex: 'detail.productDescription',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (_value, record) => {
|
||||
return <Tooltip placement="top" title={record.detail.productDescription}>{record.detail.productDescription}</Tooltip>
|
||||
}
|
||||
},
|
||||
]
|
||||
// useEffect(() => {
|
||||
// getData();
|
||||
// }, []);
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, [page]);
|
||||
return (
|
||||
<div>
|
||||
{messageContext}
|
||||
<Spin tip="加载中..." spinning={isLoading}>
|
||||
<Table columns={columns} dataSource={dataArray}
|
||||
pagination={
|
||||
{
|
||||
pageSize: 20,
|
||||
total: total,
|
||||
onChange: (currentPage) => {
|
||||
setPage(currentPage);
|
||||
},
|
||||
showSizeChanger:false
|
||||
}
|
||||
}
|
||||
scroll={{ y: 500 }} bordered key="dataTable" rowKey="orderId" />;
|
||||
</Spin>
|
||||
</div>
|
||||
)
|
||||
}
|
0
src/components/myOrder/myorder.css
Normal file
0
src/components/myOrder/myorder.css
Normal file
@ -2,10 +2,10 @@ import './head.css'
|
||||
import { useDispatch } from 'react-redux'
|
||||
import BalanceHead from '../../components/balance/BalanceHead.tsx';
|
||||
import RechargeHead from '../../components/recharge/RechargeHead.tsx';
|
||||
import { Dropdown, MenuProps, message, Modal, Space, Spin } from "antd";
|
||||
import { DownOutlined, UserOutlined, KeyOutlined, LogoutOutlined, AccountBookOutlined, MenuFoldOutlined, UsergroupAddOutlined } from "@ant-design/icons";
|
||||
import { Dropdown, MenuProps, message, Modal, Space, Spin, Input } from "antd";
|
||||
import { DownOutlined, UserOutlined, KeyOutlined, LogoutOutlined, AccountBookOutlined, ContainerOutlined, MenuFoldOutlined, UsergroupAddOutlined } from "@ant-design/icons";
|
||||
import { useContext, useEffect, useState } from "react";
|
||||
import { put,get} from "../../util/AjaxUtils.ts";
|
||||
import { put, get, post } from "../../util/AjaxUtils.ts";
|
||||
import { GlobalContext, GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
|
||||
import UserEdit from "../../components/user/UserEdit.tsx";
|
||||
import PasswordChange from "../../components/password/PasswordChange.tsx";
|
||||
@ -17,11 +17,144 @@ import { reMenuActive } from '../../util/cache';
|
||||
// import BelongPeople from '../../components/BelongPeople/BelongPeople.tsx'
|
||||
import BelongPeople from '../../components/BelongPeople/BelongPeople.tsx'
|
||||
import ContactPeople from '../../components/ContactPeople/ContactPeople.tsx'
|
||||
|
||||
import inv from '../../static/inv.png'
|
||||
import MyOrder from '../../components/myOrder/MyOrder.tsx'
|
||||
export default function Head() {
|
||||
// 邀请码弹窗
|
||||
const [invitationModal, setinvitationModal] = useState(false)
|
||||
// 解除绑定邀请码弹窗
|
||||
// const [relieveModal, setRelieveModal] = useState(false)
|
||||
// 申请的邀请码
|
||||
const [invNum, setInvNum] = useState('')
|
||||
// 输入的邀请码
|
||||
const [inInvNum, setInInvNum] = useState('')
|
||||
// 已绑定的邀请码
|
||||
const [bindingInvNum, setBindingInvNum] = useState('')
|
||||
// 邀请码申请状态
|
||||
const [icStatus, setIcStatus] = useState('')
|
||||
// 邀请码返利比例
|
||||
const [icRebateRatio, seticRebateRatio] = useState('')
|
||||
// 获取邀请码申请状态
|
||||
const getIcStatus = () => {
|
||||
get<any>({
|
||||
messageApi,
|
||||
url: '/api/ic/apply/get/self',
|
||||
onSuccess({ data }) {
|
||||
console.log(data);
|
||||
if (data) {
|
||||
setIcStatus(data.applyStatus)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取邀请码信息
|
||||
const getIc = () => {
|
||||
get<any>({
|
||||
messageApi,
|
||||
url: '/api/ic/get/self',
|
||||
onSuccess({ data }) {
|
||||
console.log(data);
|
||||
setInvNum(data.ic)
|
||||
setBindingInvNum(data.relationIc)
|
||||
seticRebateRatio(data.icRebateRatio)
|
||||
if (data.ic == '') {
|
||||
getIcStatus()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// 绑定邀请码
|
||||
const putIc = () => {
|
||||
put<any>({
|
||||
messageApi,
|
||||
url: `/api/ic/update-relation-ic`,
|
||||
body: {
|
||||
value: inInvNum
|
||||
},
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
// messageApi.success('保存成功,点击编辑按钮可继续修改项目简介');
|
||||
// console.log(data);
|
||||
getIc()
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// 确定输入的邀请码事件
|
||||
const postInvNum = () => {
|
||||
if (!inInvNum) {
|
||||
messageApi.open({
|
||||
type: 'error',
|
||||
content: '请输入邀请码'
|
||||
})
|
||||
} else {
|
||||
// setBindingInvNum(inInvNum)
|
||||
// messageApi.open({
|
||||
// type: 'success',
|
||||
// content: '已绑定邀请码'
|
||||
// })
|
||||
putIc()
|
||||
}
|
||||
}
|
||||
// 点击获取邀请码
|
||||
const getInvNum = () => {
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/ic/apply/apply`,
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
messageApi.success('已申请')
|
||||
getIcStatus()
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
// setInvNum('RSDNQ5H7')
|
||||
}
|
||||
// 复制邀请码
|
||||
const copyInvNum = () => {
|
||||
// navigator.clipboard.writeText(invNum)
|
||||
// messageApi.open({
|
||||
// type: 'success',
|
||||
// content: '已复制到剪切板'
|
||||
// })
|
||||
// 创建一个临时的 input 元素
|
||||
const tempInput = document.createElement('input');
|
||||
document.body.appendChild(tempInput);
|
||||
tempInput.value = invNum;
|
||||
|
||||
// 选中 input 中的内容
|
||||
tempInput.select();
|
||||
tempInput.setSelectionRange(0, 99999); // 对于移动设备的支持
|
||||
|
||||
// 执行复制操作
|
||||
try {
|
||||
document.execCommand('copy');
|
||||
messageApi.open({
|
||||
type: 'success',
|
||||
content: '已复制到剪切板'
|
||||
})
|
||||
} catch (err) {
|
||||
messageApi.open({
|
||||
type: 'error',
|
||||
content: '复制失败,请手动复制'
|
||||
})
|
||||
}
|
||||
|
||||
// 移除临时的 input 元素
|
||||
document.body.removeChild(tempInput);
|
||||
}
|
||||
|
||||
const dispath = useDispatch()
|
||||
// 更新所属者表格储存至redux
|
||||
const upBelongArray = () => {
|
||||
// 更新所属者表格储存至redux
|
||||
const upBelongArray = () => {
|
||||
get({
|
||||
messageApi,
|
||||
url: `/api/proj-owner/list/self`,
|
||||
@ -50,6 +183,8 @@ export default function Head() {
|
||||
const [isSelfModalOpen, setIsSelfModalOpen] = useState(false);
|
||||
const [isPasswordModalOpen, setIsPasswordModalOpen] = useState(false);
|
||||
const [isInvoiceModalOpen, setIsInvoiceModalOpen] = useState(false);
|
||||
// 我的订单弹窗
|
||||
const [myorderModal, setMyorderModal] = useState(false)
|
||||
// 所属者弹窗
|
||||
const [belongModal, setBelongModal] = useState(false)
|
||||
const [belongPeopleInfo, setBelongPeopleInfo] = useState({
|
||||
@ -109,7 +244,7 @@ export default function Head() {
|
||||
// // console.log('所属者表格', data.data);
|
||||
// // setBelongPeopleArray(data.data)
|
||||
// console.log('查看结果',data.data != belongArray);
|
||||
|
||||
|
||||
// // if (data.data == belongArray) {
|
||||
// // window.location.reload();
|
||||
// // }
|
||||
@ -119,7 +254,7 @@ export default function Head() {
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
// getLength()
|
||||
reloadUser(messageApi, globalDispatchContext).then((data) => {
|
||||
@ -128,7 +263,9 @@ export default function Head() {
|
||||
}
|
||||
});
|
||||
}, [globalContext.user]);
|
||||
|
||||
// useEffect(()=>{
|
||||
// getIc()
|
||||
// },[])
|
||||
const items: MenuProps['items'] = [
|
||||
{
|
||||
key: 'userinfo',
|
||||
@ -166,6 +303,19 @@ export default function Head() {
|
||||
setIsInvoiceModalOpen(true);
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'myorder',
|
||||
label: (
|
||||
<div className="dropdown-item">
|
||||
{/* <UsergroupAddOutlined /> */}
|
||||
<ContainerOutlined />
|
||||
<span className="title">我的订单</span>
|
||||
</div>
|
||||
),
|
||||
onClick: () => {
|
||||
setMyorderModal(true)
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'belong',
|
||||
label: (
|
||||
@ -190,6 +340,7 @@ export default function Head() {
|
||||
setContactModal(true)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
key: 'logout',
|
||||
label: (
|
||||
@ -220,6 +371,12 @@ export default function Head() {
|
||||
{/* <div className="right" style={{backgroundImage: `url(${headRightBg})`}}> */}
|
||||
|
||||
<div className="right">
|
||||
<div className='invitationButton' onClick={() => {
|
||||
setinvitationModal(true)
|
||||
getIc()
|
||||
}}>
|
||||
邀请码
|
||||
</div>
|
||||
<div className='head-nav' onClick={() => {
|
||||
window.open('https://www.aimzhu.com/operator/route/agreementportal/view?agreementId=c0c5683a-bef3-40c3-8395-900a362ea234&title=系统操作流程')
|
||||
}}>
|
||||
@ -364,6 +521,146 @@ export default function Head() {
|
||||
|
||||
<ContactPeople isShow={false} closeModal={() => { setContactModal(false) }} setConcatPeopleInfo={setConcatPeopleInfo} concatPeopleInfo={concatPeopleInfo} setConcatValue={setConcatValue}></ContactPeople>
|
||||
</Modal>
|
||||
<Modal title="邀请码"
|
||||
destroyOnClose
|
||||
|
||||
open={invitationModal}
|
||||
width={578}
|
||||
|
||||
footer={null}
|
||||
onCancel={() => {
|
||||
// getNewLength()
|
||||
setinvitationModal(false)
|
||||
setInvNum('')
|
||||
|
||||
}}>
|
||||
<div className='invitation-box'>
|
||||
<div className='invBox-top'>
|
||||
<div className='invBox-title'>
|
||||
我的邀请码
|
||||
</div>
|
||||
<div className='invBox-line'></div>
|
||||
<div className='invBox-btn' onClick={() => {
|
||||
getInvNum()
|
||||
}} style={{ display: invNum || icStatus ? 'none' : 'block' }}>
|
||||
点击申请
|
||||
</div>
|
||||
<div className='invBox-btnTwo' style={{ display: icStatus == 'PENDING' ? 'block' : 'none' }}>
|
||||
正在申请中
|
||||
</div>
|
||||
<div className='invBox-btnthree' style={{ display: icStatus == 'REJECTED' ? 'block' : 'none' }}>
|
||||
<div className='errorBox'>
|
||||
<div className='errorBox-title'> 申请失败!</div>
|
||||
<div className='errorBox-btn' onClick={() => {
|
||||
getInvNum()
|
||||
}}>重新申请</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className='invBox-Num' style={{ display: invNum ? 'block' : 'none' }}>
|
||||
<div className='invNum-box'>
|
||||
<div className='invNum'>
|
||||
{invNum}
|
||||
</div>
|
||||
<div className='copyBtn' onClick={() => {
|
||||
copyInvNum()
|
||||
}}>
|
||||
复制
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* <div style={{ display: icRebateRatio ? 'block' : 'none' }}> */}
|
||||
<div className='invBox-bot'>
|
||||
<div className='invBox-tips' >
|
||||
{icRebateRatio ? `邀请码分享给他人,即可获得${icRebateRatio}%佣金` : '邀请码分享给他人,即可获得佣金'}
|
||||
{/* 邀请码分享给他人,即可获得{icRebateRatio}%佣金 */}
|
||||
|
||||
</div>
|
||||
{/* <div className='invBox-tips'>
|
||||
失败的原因可能是XXXXXX导致,如有疑问请您咨询客服人员
|
||||
</div> */}
|
||||
</div>
|
||||
{/* </div> */}
|
||||
</div>
|
||||
<div className='invitation-box'>
|
||||
<div className='invBox-top'>
|
||||
<div className='invBox-title' style={{ fontSize: '24px' }}>
|
||||
他人邀请码
|
||||
</div>
|
||||
<div className='invBox-line'></div>
|
||||
<div className='invBox-input' style={{ display: bindingInvNum ? 'none' : 'block' }}>
|
||||
<div className='invInput'>
|
||||
<Input value={inInvNum} style={{ width: 261, height: 60, borderRadius: 25, fontSize: 24, textAlign: 'center' }} onChange={(e) => {
|
||||
setInInvNum(e.target.value)
|
||||
}} />
|
||||
<div className='invImg' onClick={() => {
|
||||
postInvNum()
|
||||
}}>
|
||||
<img src={inv} alt="" style={{ width: 31, height: 30 }} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='invBox-input' style={{ display: bindingInvNum ? 'block' : 'none' }}>
|
||||
<div className='invInput'>
|
||||
<div className='invNum-box'>
|
||||
<div className='invNum' >
|
||||
{bindingInvNum}
|
||||
</div>
|
||||
{/* <div className='relieveBtn' onClick={() => {
|
||||
setRelieveModal(true)
|
||||
}}>
|
||||
解绑
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='invBox-bot'>
|
||||
<div className='invBox-tips' >
|
||||
{bindingInvNum ? '已绑定邀请码' : '输入他人的邀请码,即可获得相应优惠'}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
{/* <Modal title="提示"
|
||||
okText="确认"
|
||||
cancelText="取消"
|
||||
destroyOnClose
|
||||
open={relieveModal}
|
||||
onOk={() => {
|
||||
setBindingInvNum('')
|
||||
setInInvNum('')
|
||||
setRelieveModal(false)
|
||||
}}
|
||||
onCancel={() => {
|
||||
setRelieveModal(false)
|
||||
|
||||
}}>
|
||||
<div>
|
||||
确定解绑当前邀请码吗?
|
||||
</div>
|
||||
</Modal> */}
|
||||
<Modal title="我的订单"
|
||||
footer={null}
|
||||
// okText="确认"
|
||||
// cancelText="取消"
|
||||
destroyOnClose
|
||||
open={myorderModal}
|
||||
// onOk={() => {
|
||||
// setBindingInvNum('')
|
||||
// setInInvNum('')
|
||||
// setRelieveModal(false)
|
||||
// }}
|
||||
width={1500}
|
||||
onCancel={() => {
|
||||
setMyorderModal(false)
|
||||
|
||||
}}>
|
||||
<MyOrder></MyOrder>
|
||||
</Modal>
|
||||
<Spin tip="正在提交..." spinning={loading} fullscreen />
|
||||
{contextHolder}
|
||||
{modalHolder}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
.head {
|
||||
width: 100vw;
|
||||
height: 69px;
|
||||
@ -23,7 +22,8 @@
|
||||
position: relative;
|
||||
|
||||
}
|
||||
.head-nav{
|
||||
|
||||
.head-nav {
|
||||
margin-right: 50px;
|
||||
color: #f78e4c;
|
||||
font-size: 16px;
|
||||
@ -90,4 +90,191 @@
|
||||
} */
|
||||
.ant-dropdown .dropdown-item .title {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.invitationButton {
|
||||
width: 81px;
|
||||
height: 36px;
|
||||
background: linear-gradient(79deg, #FFB020 0%, #FF6508 100%);
|
||||
border-radius: 27px;
|
||||
text-align: center;
|
||||
line-height: 36px;
|
||||
font-weight: 300;
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.invitation-box {
|
||||
width: 530px;
|
||||
height: 175px;
|
||||
background: #F9F9F9;
|
||||
margin-top: 16px;
|
||||
border: 1px solid #EEEEEE;
|
||||
}
|
||||
|
||||
.invBox-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 118px;
|
||||
/* background-color: skyblue; */
|
||||
}
|
||||
|
||||
.invBox-title {
|
||||
/* height: 118px; */
|
||||
width: 165px;
|
||||
/* background-color: pink; */
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
color: #454545;
|
||||
text-align: center;
|
||||
/* line-height: 118px; */
|
||||
}
|
||||
|
||||
.invBox-line {
|
||||
width: 1px;
|
||||
height: 22px;
|
||||
background: #626262;
|
||||
}
|
||||
|
||||
.invBox-btn {
|
||||
width: 362px;
|
||||
/* height: 118px; */
|
||||
/* background-color: #fcc19d; */
|
||||
font-weight: 400;
|
||||
font-size: 24px;
|
||||
color: #009C1D;
|
||||
text-decoration-line: underline;
|
||||
text-align: center;
|
||||
line-height: 118px;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.invBox-btnTwo {
|
||||
width: 362px;
|
||||
height: 118px;
|
||||
/* background-color: #fcc19d; */
|
||||
font-weight: 400;
|
||||
font-size: 24px;
|
||||
color: #009C1D;
|
||||
text-decoration-line: underline;
|
||||
text-align: center;
|
||||
line-height: 118px;
|
||||
}
|
||||
|
||||
.invBox-btnthree {
|
||||
width: 362px;
|
||||
height: 118px;
|
||||
/* background-color: #fcc19d; */
|
||||
}
|
||||
|
||||
.invBox-Num {
|
||||
width: 362px;
|
||||
height: 118px;
|
||||
/* background-color: #fcc19d; */
|
||||
}
|
||||
|
||||
.invNum-box {
|
||||
width: 362px;
|
||||
height: 118px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.invNum {
|
||||
font-weight: bold;
|
||||
font-size: 36px;
|
||||
/* color: #454545; */
|
||||
/* background-color: skyblue; */
|
||||
color: #1677FF;
|
||||
background: linear-gradient(81deg, #000000 0%, #FFAA1E 0%, #FF6E0B 99.0234375%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.copyBtn {
|
||||
font-size: 16px;
|
||||
color: #FF9F08;
|
||||
line-height: 24px;
|
||||
text-decoration-line: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.invBox-bot {
|
||||
/* background-color: pink; */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
height: 57px;
|
||||
color: #818181;
|
||||
}
|
||||
|
||||
.invBox-tips {
|
||||
width: 350px;
|
||||
/* background-color: pink; */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.invBox-input {
|
||||
width: 362px;
|
||||
height: 118px;
|
||||
/* background-color: #fcc19d; */
|
||||
|
||||
}
|
||||
|
||||
.invInput {
|
||||
width: 362px;
|
||||
height: 118px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.invImg {
|
||||
width: 31px;
|
||||
height: 30px;
|
||||
/* background-color: pink; */
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.relieveBtn {
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
color: #366B77;
|
||||
text-decoration-line: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.errorBox {
|
||||
width: 362px;
|
||||
height: 118px;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
display: flex;
|
||||
|
||||
}
|
||||
|
||||
.errorBox-title {
|
||||
font-weight: 400;
|
||||
font-size: 24px;
|
||||
color: #E21414;
|
||||
text-decoration-line: underline;
|
||||
}
|
||||
|
||||
.errorBox-btn {
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
color: #535353;
|
||||
text-decoration-line: underline;
|
||||
cursor: pointer;
|
||||
}
|
@ -2,7 +2,7 @@ import './copyrightG-goods.css'
|
||||
import {
|
||||
Select, DatePicker, Button, Table,
|
||||
// message,
|
||||
Space, Empty, Pagination, InputNumber
|
||||
Space, Empty, Pagination, InputNumber
|
||||
} from 'antd';
|
||||
import type { InputNumberProps } from 'antd';
|
||||
// import type { TableColumnsType } from 'antd';
|
||||
@ -15,20 +15,20 @@ export default function CopyrightGgoods() {
|
||||
const height = window.innerHeight - 180;
|
||||
// const [messageApi, contextHolder] = message.useMessage();
|
||||
const dateFormat = 'YYYY年MM月DD日';
|
||||
const [minPrice,setMinPrice] = useState<any>() //最低价格
|
||||
const [maxPrice,setMaxPrice] = useState<any>() //最高价格
|
||||
const [date ,setDate] = useState<any>() //获取时间
|
||||
const [sort,setSort] = useState<any>() //排序
|
||||
const [language,setLanguage] = useState<any>() //开发语言
|
||||
const [type,setType] = useState<any>() //软著类型
|
||||
const [page,setPage] = useState(1) //分页
|
||||
const [minPrice, setMinPrice] = useState<any>() //最低价格
|
||||
const [maxPrice, setMaxPrice] = useState<any>() //最高价格
|
||||
const [date, setDate] = useState<any>() //获取时间
|
||||
const [sort, setSort] = useState<any>() //排序
|
||||
const [language, setLanguage] = useState<any>() //开发语言
|
||||
const [type, setType] = useState<any>() //软著类型
|
||||
const [page, setPage] = useState(1) //分页
|
||||
// 更改最低价格
|
||||
const minPriceChange: InputNumberProps['onChange'] = (value) => {
|
||||
console.log('changed', value);
|
||||
setMinPrice(value)
|
||||
};
|
||||
// 更改最高价格
|
||||
const maxPriceChange: InputNumberProps['onChange'] = (value) => {
|
||||
// 更改最高价格
|
||||
const maxPriceChange: InputNumberProps['onChange'] = (value) => {
|
||||
console.log('changed', value);
|
||||
setMaxPrice(value)
|
||||
};
|
||||
@ -55,8 +55,8 @@ export default function CopyrightGgoods() {
|
||||
// 点击搜索
|
||||
const onSearch = () => {
|
||||
setPage(1)
|
||||
console.log(minPrice,maxPrice,date,sort,language,type);
|
||||
|
||||
console.log(minPrice, maxPrice, date, sort, language, type);
|
||||
|
||||
}
|
||||
// 初始化搜索条件
|
||||
const init = () => {
|
||||
@ -191,14 +191,14 @@ export default function CopyrightGgoods() {
|
||||
onChange={minPriceChange}
|
||||
/>
|
||||
至
|
||||
<InputNumber placeholder="最高价格" min={0} style={{
|
||||
<InputNumber placeholder="最高价格" min={0} style={{
|
||||
width: 100,
|
||||
// height: 36,
|
||||
marginRight: 12,
|
||||
marginLeft: 12
|
||||
}}
|
||||
value={maxPrice}
|
||||
onChange={maxPriceChange}
|
||||
}}
|
||||
value={maxPrice}
|
||||
onChange={maxPriceChange}
|
||||
/>
|
||||
|
||||
<DatePicker placeholder="软著获取时间"
|
||||
@ -249,7 +249,7 @@ export default function CopyrightGgoods() {
|
||||
|
||||
icon={<SearchOutlined />}
|
||||
onClick={onSearch}
|
||||
>
|
||||
>
|
||||
搜索
|
||||
</Button>
|
||||
<Button
|
||||
@ -260,7 +260,7 @@ export default function CopyrightGgoods() {
|
||||
}}
|
||||
icon={<ClearOutlined />}
|
||||
onClick={clearKeyWords}
|
||||
>
|
||||
>
|
||||
清除
|
||||
</Button>
|
||||
</div>
|
||||
@ -330,10 +330,12 @@ export default function CopyrightGgoods() {
|
||||
</div>
|
||||
{/* defaultCurrent: 默认当前页数 total:数据总数 defaultPageSize:'页面显示几条' */}
|
||||
<div className='product-release-pagination' >
|
||||
<Pagination defaultCurrent={page} total={20} defaultPageSize={10} onChange={(page) => {
|
||||
console.log(page)
|
||||
setPage(page)
|
||||
}} />
|
||||
<Pagination
|
||||
showSizeChanger={false}
|
||||
defaultCurrent={page} total={20} defaultPageSize={10} onChange={(page) => {
|
||||
console.log(page)
|
||||
setPage(page)
|
||||
}} />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
@ -21,10 +21,11 @@ export default function ProductRelease() {
|
||||
const [date, setDate] = useState<any>() // 日期
|
||||
const [language, setLanguage] = useState<any>() // 开发者语言
|
||||
const [type, setType] = useState<any>() //软著类型
|
||||
const [page,setPage] = useState(1) // 分页
|
||||
const [page, setPage] = useState(1) // 分页
|
||||
const [editModalOpen, setEditModalOpen] = useState(false) // 控制编辑弹窗
|
||||
const [delModalOpen, setDelModalOpen] = useState(false) // 控制删除弹窗
|
||||
const [sellModalOpen, setSellModalOpen] = useState(false) // 控制出售弹窗
|
||||
|
||||
// 更改所属人类型
|
||||
const belongTypeChange = (value: string) => {
|
||||
console.log(`selected ${value}`);
|
||||
@ -64,7 +65,7 @@ export default function ProductRelease() {
|
||||
console.log(dayjs(date).format(dateFormat));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 点击清除
|
||||
const clearKeyWords = () => {
|
||||
init()
|
||||
@ -90,7 +91,7 @@ export default function ProductRelease() {
|
||||
console.log('关闭', item.order);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 点击编辑
|
||||
const edit = (item: any) => {
|
||||
console.log(item.order);
|
||||
@ -168,11 +169,11 @@ export default function ProductRelease() {
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
useEffect(()=>{
|
||||
|
||||
|
||||
},[])
|
||||
useEffect(() => {
|
||||
|
||||
|
||||
}, [])
|
||||
|
||||
|
||||
return (
|
||||
@ -335,10 +336,12 @@ export default function ProductRelease() {
|
||||
|
||||
{/* defaultCurrent: 默认当前页数 total:数据总数 defaultPageSize:'页面显示几条' */}
|
||||
<div className='product-release-pagination'>
|
||||
<Pagination defaultCurrent={page} total={20} defaultPageSize={10} onChange={(page) => {
|
||||
// console.log(page)
|
||||
setPage(page)
|
||||
}} />
|
||||
<Pagination
|
||||
showSizeChanger={false}
|
||||
defaultCurrent={page} total={20} defaultPageSize={10} onChange={(page) => {
|
||||
// console.log(page)
|
||||
setPage(page)
|
||||
}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -18,9 +18,9 @@ export default function SearchList() {
|
||||
const [total, setTotal] = useState(0);
|
||||
// const [keywords, setKeywords] = useState('');
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
const {state} = useLocation()
|
||||
const { state } = useLocation()
|
||||
// console.log(state);
|
||||
|
||||
|
||||
const reqData = (currentPage: number) => {
|
||||
get<IListPage<IProj>>({
|
||||
messageApi: messageApi,
|
||||
@ -85,9 +85,11 @@ export default function SearchList() {
|
||||
{renderList()}
|
||||
</div>
|
||||
<div className="SearchListPage">
|
||||
<Pagination defaultCurrent={page} total={total} onChange={(page) => {
|
||||
setPage(page);
|
||||
}} />
|
||||
<Pagination
|
||||
showSizeChanger={false}
|
||||
defaultCurrent={page} total={total} onChange={(page) => {
|
||||
setPage(page);
|
||||
}} />
|
||||
</div>
|
||||
</Spin>
|
||||
</div>
|
||||
|
@ -214,10 +214,12 @@ export default function TradingGoods() {
|
||||
</div>
|
||||
{/* defaultCurrent: 默认当前页数 total:数据总数 defaultPageSize:'页面显示几条' */}
|
||||
<div className='product-release-pagination' >
|
||||
<Pagination defaultCurrent={page} total={20} defaultPageSize={10} onChange={(page) => {
|
||||
console.log(page)
|
||||
setPage(page)
|
||||
}} />
|
||||
<Pagination
|
||||
showSizeChanger={false}
|
||||
defaultCurrent={page} total={20} defaultPageSize={10} onChange={(page) => {
|
||||
console.log(page)
|
||||
setPage(page)
|
||||
}} />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
@ -3,7 +3,7 @@ import './transaction-order.css'
|
||||
import {
|
||||
Select, DatePicker, Button, Table,
|
||||
// message,
|
||||
Space, Empty, Pagination,Modal
|
||||
Space, Empty, Pagination, Modal
|
||||
} from 'antd';
|
||||
import dayjs, { } from 'dayjs';
|
||||
// import type { TableColumnsType } from 'antd';
|
||||
@ -276,10 +276,12 @@ export default function TransactionOrder() {
|
||||
</div>
|
||||
{/* defaultCurrent: 默认当前页数 total:数据总数 defaultPageSize:'页面显示几条' */}
|
||||
<div className='product-release-pagination' >
|
||||
<Pagination defaultCurrent={page} total={20} defaultPageSize={10} onChange={(page) => {
|
||||
console.log(page)
|
||||
setPage(page)
|
||||
}} />
|
||||
<Pagination
|
||||
showSizeChanger={false}
|
||||
defaultCurrent={page} total={20} defaultPageSize={10} onChange={(page) => {
|
||||
console.log(page)
|
||||
setPage(page)
|
||||
}} />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
@ -484,7 +484,7 @@ export default function Index() {
|
||||
// authorId: ''
|
||||
// }
|
||||
// })
|
||||
|
||||
|
||||
// } else {
|
||||
// nav('/home', {
|
||||
// state: {
|
||||
@ -509,7 +509,7 @@ export default function Index() {
|
||||
// }
|
||||
// console.log('type',type);
|
||||
// console.log('chargeAdditionals',chargeAdditionals);
|
||||
|
||||
|
||||
}, [type, chargeAdditionals, keywords, tagDataId, authorId]);
|
||||
|
||||
const handleSearch = (value: string) => {
|
||||
@ -630,6 +630,7 @@ export default function Index() {
|
||||
</div> */}
|
||||
<div className='belong-pagination'>
|
||||
<Pagination
|
||||
showSizeChanger={false}
|
||||
current={currentPage}
|
||||
total={totalItems}
|
||||
pageSize={itemsPerPage}
|
||||
@ -786,13 +787,15 @@ export default function Index() {
|
||||
/>
|
||||
<Button onClick={() => {
|
||||
init()
|
||||
}} style={{ marginLeft: 10, display: location.pathname.includes('/home') ? 'block' : 'none', height: 31 }} type="primary" icon={<ClearOutlined />}>
|
||||
}} style={{ marginLeft: 10, display: showSearchBox ? 'block' : 'none', height: 31 }}
|
||||
// type="primary"
|
||||
icon={<ClearOutlined />}>
|
||||
清除
|
||||
</Button>
|
||||
<div style={{
|
||||
width: '253px',
|
||||
height: '31px',
|
||||
display: location.pathname.includes('/home') ? 'none' : 'block'
|
||||
display: showSearchBox ? 'none' : 'block'
|
||||
}}></div>
|
||||
<div className='nowPosition'>
|
||||
<img src={backImg} alt="" />
|
||||
|
@ -570,7 +570,7 @@ export default function ProjConfigLoginpage(props: any) {
|
||||
}}>
|
||||
{/* src={`${Axios.defaults?.baseURL}/route/file/v2/download/true/${previewImgs}`} */}
|
||||
|
||||
<img src={downloadUrl(selectImgs,false)} alt="" width={'93%'} height={'97%'} />
|
||||
<img src={downloadUrl(selectImgs, false)} alt="" width={'93%'} height={'97%'} />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -664,7 +664,7 @@ export default function ProjConfigLoginpage(props: any) {
|
||||
// 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: '10px', marginBottom: '10px', height: 270 }}
|
||||
onClick={() => {
|
||||
setModalId(item.loginpageId)
|
||||
setModalImg(item.previewImgs)
|
||||
@ -687,12 +687,14 @@ export default function ProjConfigLoginpage(props: any) {
|
||||
</div>
|
||||
<div className='pagination'>
|
||||
{/* defaultCurrent: 默认当前页数 total:数据总数 defaultPageSize:'页面显示几条' */}
|
||||
<Pagination defaultCurrent={1} total={total} defaultPageSize={10} onChange={(page) => {
|
||||
// console.log(page);
|
||||
// setPage(page)
|
||||
setloginpageArray([])
|
||||
getlistLoginpage(page)
|
||||
}} />
|
||||
<Pagination
|
||||
showSizeChanger={false}
|
||||
defaultCurrent={1} total={total} defaultPageSize={10} onChange={(page) => {
|
||||
// console.log(page);
|
||||
// setPage(page)
|
||||
setloginpageArray([])
|
||||
getlistLoginpage(page)
|
||||
}} />
|
||||
</div>
|
||||
|
||||
</Modal>
|
||||
|
@ -1,8 +1,8 @@
|
||||
import './proj-edit-step.css';
|
||||
import { Col, Flex, message, Modal, Row, Spin, Pagination, Image } from "antd";
|
||||
import { Col, Flex, message, Modal, Row, Spin, Pagination, Image } from "antd";
|
||||
import { useParams } from "react-router-dom";
|
||||
import { useEffect, useState } from "react";
|
||||
import { get, put,downloadUrl } from "../../../util/AjaxUtils.ts";
|
||||
import { get, put, downloadUrl } from "../../../util/AjaxUtils.ts";
|
||||
import { Button, Form, Input } from 'antd';
|
||||
import { AxiosResponse, } from "axios";
|
||||
import { errorImage } from "../../../util/CommonUtil.ts";
|
||||
@ -327,7 +327,7 @@ export default function ProjEditStep1(props: any) {
|
||||
// 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: '10px', marginBottom: '10px', height: 250 }}
|
||||
onClick={() => {
|
||||
setSelectedId(item.codeTypePageId)
|
||||
setSelectedImg(item.previewImgs)
|
||||
@ -352,12 +352,14 @@ export default function ProjEditStep1(props: any) {
|
||||
</div>
|
||||
<div className='pagination'>
|
||||
{/* defaultCurrent: 默认当前页数 total:数据总数 defaultPageSize:'页面显示几条' */}
|
||||
<Pagination defaultCurrent={1} total={total} defaultPageSize={10} onChange={(page) => {
|
||||
// console.log(page);
|
||||
setpage(page)
|
||||
setpageImgArray([])
|
||||
getPageImgData(page)
|
||||
}} />
|
||||
<Pagination
|
||||
showSizeChanger={false}
|
||||
defaultCurrent={1} total={total} defaultPageSize={10} onChange={(page) => {
|
||||
// console.log(page);
|
||||
setpage(page)
|
||||
setpageImgArray([])
|
||||
getPageImgData(page)
|
||||
}} />
|
||||
</div>
|
||||
|
||||
</Modal>
|
||||
|
BIN
src/static/capita.png
Normal file
BIN
src/static/capita.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
src/static/inv.png
Normal file
BIN
src/static/inv.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
src/static/record.png
Normal file
BIN
src/static/record.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
@ -1,30 +1,30 @@
|
||||
import {createStore} from "redux"
|
||||
import { createStore } from "redux"
|
||||
// 设置数据
|
||||
const baseState = {
|
||||
msg:'嘻嘻嘻嘻嘻嘻',
|
||||
num:10,
|
||||
shuju:{
|
||||
name:'小白',
|
||||
hobby:'吃饭',
|
||||
val:''
|
||||
},
|
||||
belongArray:[]
|
||||
|
||||
// msg: '嘻嘻嘻嘻嘻嘻',
|
||||
// num: 10,
|
||||
// shuju: {
|
||||
// name: '小白',
|
||||
// hobby: '吃饭',
|
||||
// val: ''
|
||||
// },
|
||||
belongArray: []
|
||||
|
||||
}
|
||||
|
||||
// 创建仓库
|
||||
const reducer = (state = baseState,action:any)=>{
|
||||
const nstate:any = JSON.parse(JSON.stringify(state))
|
||||
if(action.type=="numadd"){
|
||||
nstate.num++
|
||||
// console.log('123');
|
||||
}
|
||||
if(action.type=='new'){
|
||||
nstate.shuju.val = action.val
|
||||
console.log(nstate.shuju.val);
|
||||
}
|
||||
const reducer = (state = baseState, action: any) => {
|
||||
const nstate: any = JSON.parse(JSON.stringify(state))
|
||||
// if (action.type == "numadd") {
|
||||
// nstate.num++
|
||||
// // console.log('123');
|
||||
// }
|
||||
// if (action.type == 'new') {
|
||||
// nstate.shuju.val = action.val
|
||||
// console.log(nstate.shuju.val);
|
||||
// }
|
||||
// redux 要求 state必须深拷贝一次 才能返回
|
||||
if(action.type == 'uparray'){
|
||||
if (action.type == 'uparray') {
|
||||
nstate.belongArray = action.val
|
||||
}
|
||||
return nstate
|
||||
|
Loading…
Reference in New Issue
Block a user