This commit is contained in:
ylj20011123 2026-02-14 16:59:11 +08:00
parent ba6805b619
commit 1c1d232272
6 changed files with 131 additions and 18 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -1,6 +1,6 @@
{ {
"name": "ant-design-pro", "name": "ant-design-pro",
"version": "4.5.146", "version": "4.5.148",
"private": true, "private": true,
"description": "An out-of-box UI solution for enterprise applications", "description": "An out-of-box UI solution for enterprise applications",
"scripts": { "scripts": {

View File

@ -14,6 +14,7 @@ import { compressImage } from "@/utils/imageCompress";
import ProTable, { ActionType } from "@ant-design/pro-table"; import ProTable, { ActionType } from "@ant-design/pro-table";
import './style.less' import './style.less'
import ModalFooter from "../../scenicSpotConfig/component/modalFooter"; import ModalFooter from "../../scenicSpotConfig/component/modalFooter";
import { exportXlsxFromProColumnsExcelJS } from "@/utils/format";
type DetailProps = { type DetailProps = {
parentRow: any;// 传入的当前行数据 parentRow: any;// 传入的当前行数据
@ -68,6 +69,8 @@ const EventRegistrationDetail = ({ parentRow, setparentRow, onShow, setOnShow, c
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片 const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
const serverpartObj = session.get('serverpartObj') const serverpartObj = session.get('serverpartObj')
const serverpartList = session.get('serverpartList') const serverpartList = session.get('serverpartList')
// 当前活动人员名单数据
const [currentActivityList, setCurrentActivityList] = useState<any>([])
// 选择服务区的悬浮框 // 选择服务区的悬浮框
const [selectServerpartModal, handleSelectServerpartModal] = useState<boolean>(false) const [selectServerpartModal, handleSelectServerpartModal] = useState<boolean>(false)
// 预览上传后的图片 // 预览上传后的图片
@ -108,6 +111,79 @@ const EventRegistrationDetail = ({ parentRow, setparentRow, onShow, setOnShow, c
}, },
] ]
// 活动报名人员的导出excel的columns
const exportColumns: any = [
{
title: "人员姓名",
width: 180,
dataIndex: "MEMBERSHIP_NAME",
ellipsis: true,
hideInSearch: true,
},
{
title: "联系方式",
width: 180,
dataIndex: "MEMBERSHIP_MOBILEPHONE",
ellipsis: true,
hideInSearch: true,
},
{
title: "报名人单位",
width: 180,
dataIndex: "MEMBERSHIP_UNIT",
ellipsis: true,
hideInSearch: true,
},
{
title: "报名人性别",
width: 180,
dataIndex: "MEMBERSHIP_GENDER",
ellipsis: true,
hideInSearch: true,
},
{
title: "报名人年龄",
width: 180,
dataIndex: "MEMBERSHIP_AGE",
ellipsis: true,
hideInSearch: true,
},
{
title: "参与人数",
width: 180,
dataIndex: "MEMBERSHIP_COUNT",
ellipsis: true,
hideInSearch: true,
},
{
title: "套餐编码",
width: 180,
dataIndex: "PACKAGE_CODE",
ellipsis: true,
hideInSearch: true,
},
{
title: "套餐名称",
width: 180,
dataIndex: "PACKAGE_NAME",
ellipsis: true,
hideInSearch: true,
},
{
title: "报名时间",
width: 180,
dataIndex: "OPERATE_DATE",
ellipsis: true,
hideInSearch: true,
},
{
title: "备注说明",
width: 180,
dataIndex: "ACTIVITYDETAIL_DESC",
ellipsis: true,
hideInSearch: true,
}
]
// 删除活动的方法 // 删除活动的方法
const handleGetDeleteActivity = async (activityId: string) => { const handleGetDeleteActivity = async (activityId: string) => {
@ -212,6 +288,7 @@ const EventRegistrationDetail = ({ parentRow, setparentRow, onShow, setOnShow, c
setOnShow(false) setOnShow(false)
setparentRow(undefined); setparentRow(undefined);
setFileList([]) setFileList([])
setCurrentActivityList([])
}} }}
onOk={async () => { onOk={async () => {
modalFromRef.current?.validateFields().then((values) => { modalFromRef.current?.validateFields().then((values) => {
@ -302,6 +379,7 @@ const EventRegistrationDetail = ({ parentRow, setparentRow, onShow, setOnShow, c
STAFF_NAME: currentUser.Name, STAFF_NAME: currentUser.Name,
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
RelateList: RelateList, RelateList: RelateList,
ACTIVITY_IMG: "",
} }
} else { } else {
req = { req = {
@ -314,6 +392,7 @@ const EventRegistrationDetail = ({ parentRow, setparentRow, onShow, setOnShow, c
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
RelateList: RelateList, RelateList: RelateList,
ACTIVITY_STATE: 2, ACTIVITY_STATE: 2,
ACTIVITY_IMG: "",
} }
} }
console.log('reqreqreqreq', req); console.log('reqreqreqreq', req);
@ -346,6 +425,7 @@ const EventRegistrationDetail = ({ parentRow, setparentRow, onShow, setOnShow, c
setOnShow(false) setOnShow(false)
setparentRow(undefined); setparentRow(undefined);
setFileList([]) setFileList([])
setCurrentActivityList([])
if (actionRef) { if (actionRef) {
actionRef.current?.reload() actionRef.current?.reload()
} }
@ -392,6 +472,22 @@ const EventRegistrationDetail = ({ parentRow, setparentRow, onShow, setOnShow, c
readonly={readonly} readonly={readonly}
/> />
</Col> </Col>
<Col span={12}>
<ProFormDatePicker
label={"报名开始时间"}
name={"SIGNUP_STARTDATE"}
width="lg"
readonly={readonly}
/>
</Col>
<Col span={12}>
<ProFormDatePicker
label={"报名结束时间"}
name={"SIGNUP_ENDDATE"}
width="lg"
readonly={readonly}
/>
</Col>
<Col span={12}> <Col span={12}>
<ProFormSelect <ProFormSelect
label={"活动类型"} label={"活动类型"}
@ -530,18 +626,46 @@ const EventRegistrationDetail = ({ parentRow, setparentRow, onShow, setOnShow, c
request={async () => { request={async () => {
const req: any = { const req: any = {
SearchParameter: { SearchParameter: {
ACTIVITY_IDS: parentRow?.ACTIVITY_ID ACTIVITY_IDS: parentRow?.ACTIVITY_ID,
ACTIVITYDETAIL_STATE: 1
}, },
PageIndex: 1, PageIndex: 1,
PageSize: 999999, PageSize: 999999,
} }
const data = await handleGetACTIVITYDETAILList(req) const data = await handleGetACTIVITYDETAILList(req)
console.log('datadatadata', data); console.log('datadatadata', data);
setCurrentActivityList(data)
if (data && data.length > 0) { if (data && data.length > 0) {
return { data, success: true } let list = JSON.parse(JSON.stringify(data))
list.forEach((item: any) => {
item.MEMBERSHIP_GENDER = item.MEMBERSHIP_GENDER === 1 ? '男' : '女'
item.OPERATE_DATE = moment(item.OPERATE_DATE).format('YYYY-MM-DD HH:mm:ss')
})
setCurrentActivityList(list)
return { data: list, success: true }
} }
setCurrentActivityList([])
return { data: [], success: true } return { data: [], success: true }
}} }}
toolbar={{
actions: [
<Button key="new" type="primary" onClick={(e) => {
if (currentActivityList && currentActivityList.length > 0) {
exportXlsxFromProColumnsExcelJS(exportColumns,
currentActivityList,
`${parentRow?.ACTIVITY_NAME}报名人员`,
{
}
)
} else {
message.error('暂无导出数据!')
}
}}>
Excel
</Button>
]
}}
/> : "" /> : ""
} }

View File

@ -19,8 +19,6 @@ export async function handleGetACTIVITYList(params?: any) {
// 同步活动 // 同步活动
export async function handleGetSynchroACTIVITY(params?: any) { export async function handleGetSynchroACTIVITY(params?: any) {
console.log('231231');
const data = await requestEncryption(`/Member/SynchroACTIVITY`, { const data = await requestEncryption(`/Member/SynchroACTIVITY`, {
method: 'POST', method: 'POST',
data: { ...params, requestEncryption: true } data: { ...params, requestEncryption: true }

View File

@ -67,15 +67,9 @@ requestEncryption.interceptors.request.use((url, opt: any) => {
const options = { ...opt } const options = { ...opt }
const currentUser: CurrentUser = session.get('currentUser'); const currentUser: CurrentUser = session.get('currentUser');
console.log('currentUsercurrentUsercurrentUser', currentUser);
console.log('optionsoptionsoptions', options);
console.log('urlurlurlurl', url);
if (currentUser) { if (currentUser) {
if (options.headers) { if (options.headers) {
if (url.indexOf('SynchroSERVERPART') > -1) { if (url.indexOf('SynchroSERVERPART') > -1) {
console.log('1');
options.headers = { options.headers = {
...options.headers, ...options.headers,
PROVINCE_CODE: opt?.data?.PROVINCE_CODE, PROVINCE_CODE: opt?.data?.PROVINCE_CODE,
@ -88,7 +82,6 @@ requestEncryption.interceptors.request.use((url, opt: any) => {
} }
} else { } else {
console.log('2');
options.headers = { options.headers = {
...options.headers, ...options.headers,
token: currentUser.UserToken || '', token: currentUser.UserToken || '',
@ -101,7 +94,6 @@ requestEncryption.interceptors.request.use((url, opt: any) => {
} }
if (url.indexOf('SynchroSERVERPART') > -1) { if (url.indexOf('SynchroSERVERPART') > -1) {
console.log('3');
options.data = { options.data = {
...options.data, ...options.data,
STAFF_ID: currentUser.ID, STAFF_ID: currentUser.ID,
@ -111,8 +103,7 @@ requestEncryption.interceptors.request.use((url, opt: any) => {
} }
} else { } else {
if ((url.indexOf('Synchro') > -1 || url.indexOf('Save') > -1) && if ((url.indexOf('Synchro') > -1 || url.indexOf('Save') > -1) &&
url.indexOf('Picture/SaveImgFile') === -1 && !requestEncryption) { url.indexOf('Picture/SaveImgFile') === -1 && !options.data.requestEncryption) {
console.log('4');
options.data = { options.data = {
...options.data, ...options.data,
STAFF_ID: currentUser.ID, STAFF_ID: currentUser.ID,

View File

@ -1,4 +1,4 @@
// 由 scripts/writeVersion.js 自动生成 // 由 scripts/writeVersion.js 自动生成
export const VERSION = "4.5.146"; export const VERSION = "4.5.148";
export const GIT_HASH = "7427b81"; export const GIT_HASH = "ba6805b";
export const BUILD_TIME = "2026-02-12T01:43:51.073Z"; export const BUILD_TIME = "2026-02-14T08:20:31.280Z";