样式修改

This commit is contained in:
lyp 2025-03-02 18:07:03 +08:00
parent c8bfe44225
commit 018c492184
2 changed files with 168 additions and 27 deletions

View File

@ -93,7 +93,7 @@ type FieldType = {
// },
// ];
import { DownOutlined, UserOutlined, QuestionCircleOutlined, BellOutlined, KeyOutlined, LogoutOutlined, GiftOutlined, AccountBookOutlined, ContainerOutlined, MenuFoldOutlined, UsergroupAddOutlined, } from "@ant-design/icons";
import { DownOutlined, UserOutlined, QuestionCircleOutlined, BellOutlined, KeyOutlined, LogoutOutlined, GiftOutlined, AccountBookOutlined, ContainerOutlined, MenuFoldOutlined, UsergroupAddOutlined,TableOutlined } from "@ant-design/icons";
import { useContext, useEffect, useState } from "react";
import {
put, get,
@ -116,8 +116,43 @@ import ContactPeople from '../../components/ContactPeople/ContactPeople.tsx'
import inv from '../../static/inv.png'
import MyOrder from '../../components/myOrder/MyOrder.tsx'
import NoticeModal from '../../components/NoticeModal/NoticeModal.tsx';
import type {
TableColumnsType,
} from 'antd';
// import HeadCouponModal from '../../components/CouponModal/HeadCouponModal.tsx'
export default function Head() {
const [packList, setPackList] = useState<any[]>([]) //服务包列表
const [packPage, setPackPage] = useState(1) //服务包分页
const [packTotal, setPackTotal] = useState(0) //服务包总数
// 获取我得服务包信息
const getPickList = () => {
get<any>({
messageApi,
url: `/api/proj/servicepkg/packageorder/listpage/self`,
config: {
params: {
page: packPage,
rows: 10,
}
},
onBefore() {
},
onSuccess({ data }) {
setPackList(data.rows)
setPackTotal(data.total)
},
onFinally() {
}
})
}
useEffect(() => {
getPickList();
}, [packPage]);
const [page, setPage] = useState(1) //邀请码使用人数分页
const [total, setTotal] = useState(0) //邀请码使用人数总量
const [icListLoading, setIcListLoading] = useState(false)
@ -584,6 +619,8 @@ export default function Head() {
}
// 联系人弹窗
const [contactModal, setContactModal] = useState(false)
// 套餐包弹窗
const [packageModal, setPackageModal] = useState(false)
const [concatPeopleInfo, setConcatPeopleInfo] = useState({
applyConcatId: '',
applyContactCsaNo: '',
@ -592,6 +629,62 @@ export default function Head() {
applyContactPhone: '',
applyContactCompany: ''
})
const packColumns: TableColumnsType<DataType> = [
{
title: '序号',
dataIndex: 'index',
key: 'packageOrderId',
align: 'center',
render: (_text, _record, index) => (page - 1) * 10 + index + 1, // 显示序号从1开始
},
{
title: '套餐名称',
dataIndex: 'packageName',
key: 'packageOrderId',
// 居中显示
align: 'center',
},
// packageType
{
title: '套餐类型',
dataIndex: 'packageType',
key: 'packageOrderId',
// 居中显示
align: 'center',
render: (text) => {
return <div>{text=="ALL"?'全托管':'写材料'} </div>
}
},
{
title: '价格',
dataIndex: 'packageTotalMoney',
key: 'packageOrderId',
// 居中显示
align: 'center',
render: (text) => {
return <div>{text/100}</div>
}
},
{
title: '当前剩余次数',
dataIndex: 'packageTotalSurplusCount',
align: 'center',
key: 'packageOrderId',
render: (text: number) => {
return <div>{text} </div>
}
},
{
title: '下单时间',
align: 'center',
dataIndex: 'gmtCreate',
key: 'packageOrderId',
// render: (text: string) => {
// return <div title={text} style={{ width: 200, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{text}</div>
// }
},
];
// 优惠券弹窗
// const [couponModal, setCouponModal] = useState(false)
// const [belongArray,setBelongArray] = useState([])
@ -747,6 +840,20 @@ export default function Head() {
})
}
},
{
key: 'package',
label: (
<div className="dropdown-item">
<TableOutlined />
<span className="title"></span>
</div>
),
onClick: () => {
// setCouponModal(true)
setPackageModal(true)
setPackPage(1);
}
},
{
key: 'logout',
@ -844,6 +951,7 @@ export default function Head() {
</div>
</div>
<Modal open={isSelfModalOpen}
centered
destroyOnClose={true}
title="个人信息"
footer={false}
@ -888,6 +996,7 @@ export default function Head() {
}} />
</Modal>
<Modal open={isPasswordModalOpen}
centered
title="修改密码"
footer={false}
onCancel={() => {
@ -925,6 +1034,7 @@ export default function Head() {
}} />
</Modal>
<Modal open={isInvoiceModalOpen}
centered
title="发票管理"
width={1100}
footer={false}
@ -934,7 +1044,7 @@ export default function Head() {
</Modal>
<Modal title="知识产权所属者"
destroyOnClose
centered
open={belongModal}
width={1200}
@ -950,7 +1060,7 @@ export default function Head() {
</Modal>
<Modal title="知识产权联系人"
destroyOnClose
centered
open={contactModal}
width={1200}
@ -962,6 +1072,34 @@ export default function Head() {
<ContactPeople isShow={false} closeModal={() => { setContactModal(false) }} setConcatPeopleInfo={setConcatPeopleInfo} concatPeopleInfo={concatPeopleInfo} setConcatValue={setConcatValue}></ContactPeople>
</Modal>
<Modal title="套餐包"
destroyOnClose
centered
open={packageModal}
width={1000}
footer={null}
onCancel={() => {
setPackageModal(false)
}}>
<Table
columns={packColumns}
dataSource={packList}
pagination={{
defaultPageSize: 10, // 设置默认一页显示 5 条数据,
current: packPage,
total: packTotal,
onChange: (page: number) => {
setPackPage(page);
// getPickList(page)
// console.log(page);
}
}}
rowKey="packageOrderId"
/>
</Modal>
<Modal title="邀请码"
destroyOnClose
centered

View File

@ -315,12 +315,13 @@ export default function ProjNew() {
get<any>({
messageApi,
url: `/api/proj/servicepkg/packageorder/listpage/${pathParams.projChargeType}/self`,
url: `/api/proj/servicepkg/packageorder/listpage/self`,
config: {
params: {
page: page,
rows: 5,
keYong : "keYong",
packageType: pathParams.projChargeType,
}
},
onBefore() {
@ -714,7 +715,8 @@ export default function ProjNew() {
</Form.Item>
<div
style={{ display: selectPack ? 'none' : 'unset', position: 'absolute', right: 23, fontSize: 16, color: packList.length ? '#1F79FF' : '#676767', cursor: 'pointer',
style={{
display: selectPack ? 'none' : 'unset', position: 'absolute', right: 23, fontSize: 16, color: packList.length ? '#1F79FF' : '#676767', cursor: 'pointer',
// background:'pink',
width: 290,
textAlign: 'right',
@ -763,7 +765,8 @@ export default function ProjNew() {
<Input style={{ background: '#eeeeee', fontSize: 16, width: '310px', height: '50px', color: '#3B3B3B' }} placeholder={hasCoupon ? '请选择优惠券' : '暂无可用优惠券'} disabled />
</Form.Item>
<div style={{ display: couponId ? 'none' : 'unset', position: 'absolute', right: 23, fontSize: 16, color: hasCoupon ? '#1F79FF' : '#676767', cursor: 'pointer',
<div style={{
display: couponId ? 'none' : 'unset', position: 'absolute', right: 23, fontSize: 16, color: hasCoupon ? '#1F79FF' : '#676767', cursor: 'pointer',
width: 290,
textAlign: 'right',
}} onClick={() => {