diff --git a/config/routes.ts b/config/routes.ts index a3257e0..f42cdf2 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -484,9 +484,9 @@ export default [ icon: 'AccountBookOutlined', routes: [ { - path: 'CardCouponApplicRules', - name: 'CardCouponApplicRules', - component: './CardInformation/CardCouponApplicRules/index' + path: 'CardCouponApplicRule', + name: 'CardCouponApplicRule', + component: './CardInformation/CardCouponApplicRule/index' }, { path: 'CardInformationManager', diff --git a/dist.zip b/dist.zip index 8e797d7..f25e2b4 100644 Binary files a/dist.zip and b/dist.zip differ diff --git a/package.json b/package.json index a874e63..3ecea17 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ant-design-pro", - "version": "4.5.80", + "version": "4.5.83", "private": true, "description": "An out-of-box UI solution for enterprise applications", "scripts": { diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx index 3c5e972..4773ee1 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -225,7 +225,7 @@ const BasicLayout: React.FC = (props) => { const handleGetAllFieldEnum = async () => { // 云南会员类型枚举 - getFieldEnumTravel({ FieldExplainField: 'MEMBERSHIP_TYPE', FieldEnumStatus: 1 }).then((MEMBERSHIPTYPEYN: any) => { + getFieldEnumTravel({ FieldExplainField: 'MEMBERSHIP_TYPE', FieldEnumStatus: '0,1,2' }).then((MEMBERSHIPTYPEYN: any) => { if (MEMBERSHIPTYPEYN && MEMBERSHIPTYPEYN.length > 0) { const obj: any = {} const list: any = [] @@ -239,6 +239,21 @@ const BasicLayout: React.FC = (props) => { } }) + // 云南会员类型枚举 + getFieldEnumTravel({ FieldExplainField: 'MEMBERSHIP_TYPE', FieldEnumStatus: '1' }).then((MEMBERSHIPTYPEYN: any) => { + if (MEMBERSHIPTYPEYN && MEMBERSHIPTYPEYN.length > 0) { + const obj: any = {} + const list: any = [] + MEMBERSHIPTYPEYN.forEach((item: any) => { + list.push({ label: item.label, value: item.value }) + obj[item.value] = item.label + }) + session.set('MEMBERSHIPTYPEYNListIsAllOK', list); + session.set('MEMBERSHIPTYPEYNObjIsAllOK', obj); + session.set('MEMBERSHIPTYPEYNTreeIsAllOK', MEMBERSHIPTYPEYN); + } + }) + // 云南的会员等级枚举 handeGetNestingFIELDENUMList({ FIELDEXPLAIN_FIELD: 'MEMBERSHIP_LEVEL_YN', diff --git a/src/pages/CardInformation/CardCouponApplicRules/components/selectServiceShop.tsx b/src/pages/CardInformation/CardCouponApplicRule/components/selectServiceShop.tsx similarity index 98% rename from src/pages/CardInformation/CardCouponApplicRules/components/selectServiceShop.tsx rename to src/pages/CardInformation/CardCouponApplicRule/components/selectServiceShop.tsx index 945e49f..b056a5e 100644 --- a/src/pages/CardInformation/CardCouponApplicRules/components/selectServiceShop.tsx +++ b/src/pages/CardInformation/CardCouponApplicRule/components/selectServiceShop.tsx @@ -32,7 +32,7 @@ const SelectServiceShop = ({ currentUser, showDetail, onCancel, onOk, currentRow dataIndex: 'searchText', hideInTable: true, fieldProps: { - placeholder: '请输入用户昵称/手机号码/订单编号' + placeholder: '请输入服务区名称/门店名称' } }, { diff --git a/src/pages/CardInformation/CardCouponApplicRules/index.less b/src/pages/CardInformation/CardCouponApplicRule/index.less similarity index 100% rename from src/pages/CardInformation/CardCouponApplicRules/index.less rename to src/pages/CardInformation/CardCouponApplicRule/index.less diff --git a/src/pages/CardInformation/CardCouponApplicRules/index.tsx b/src/pages/CardInformation/CardCouponApplicRule/index.tsx similarity index 100% rename from src/pages/CardInformation/CardCouponApplicRules/index.tsx rename to src/pages/CardInformation/CardCouponApplicRule/index.tsx diff --git a/src/pages/CardInformation/CardVoucherRedemption/index.tsx b/src/pages/CardInformation/CardVoucherRedemption/index.tsx index 1a5b81b..81d9204 100644 --- a/src/pages/CardInformation/CardVoucherRedemption/index.tsx +++ b/src/pages/CardInformation/CardVoucherRedemption/index.tsx @@ -10,6 +10,7 @@ import { handeGetCouponExchangeSummary } from "@/pages/travelMember/service"; import moment from 'moment' import { highlightText } from "@/utils/highlightText"; import CardInfo from "../CardInformationManager/components/CardInfo"; +import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree"; const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { const { currentUser } = props @@ -137,7 +138,8 @@ const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }>
- + {/* */} +
let req: any = { OwnerUnitId: currentUser?.OwnerUnitId, - ServerpartId: "", + ServerpartId: selectedId || "", StartDate: params?.STARTDATE || "", EndDate: params?.ENDDATE || "", - CouponType: params?.CouponType || "" + CouponType: params?.CouponType || "", + SearchKeyName: "COUPON_NAME", + SearchKeyValue: params?.searchValue || "" } let data: any = await handeGetCouponExchangeSummary(req) diff --git a/src/pages/CardInformation/CardVoucherSearch/components/selectCardVouch.tsx b/src/pages/CardInformation/CardVoucherSearch/components/selectCardVouch.tsx index d62e1bf..c2a8904 100644 --- a/src/pages/CardInformation/CardVoucherSearch/components/selectCardVouch.tsx +++ b/src/pages/CardInformation/CardVoucherSearch/components/selectCardVouch.tsx @@ -161,7 +161,7 @@ const selectCardVouch = ({ setSelectedId, reload, actionRef, currentUser, width, @@ -181,7 +181,7 @@ const selectCardVouch = ({ setSelectedId, reload, actionRef, currentUser, width,
} colSpan={!collapsible ? "300px" : "60px"} - title={!collapsible ? "请选择服务区" : ""} + title={!collapsible ? "请选择卡券" : ""} headerBordered collapsed={collapsible} > diff --git a/src/pages/CardInformation/CardVoucherSearch/index.tsx b/src/pages/CardInformation/CardVoucherSearch/index.tsx index 2208ab2..80f4edc 100644 --- a/src/pages/CardInformation/CardVoucherSearch/index.tsx +++ b/src/pages/CardInformation/CardVoucherSearch/index.tsx @@ -270,7 +270,7 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool // 核销时间 USED_DATE_Start: params?.searchType === '2' ? params?.STARTDATE : '', USED_DATE_End: params?.searchType === '2' ? params?.ENDDATE : '', - COUPON_STATE: params?.COUPON_STATE || "" + COUPON_STATE: params?.COUPON_STATES || "" }, PageIndex: 1, PageSize: 999999, diff --git a/src/pages/DataVerification/service.ts b/src/pages/DataVerification/service.ts index bee488c..501f2e3 100644 --- a/src/pages/DataVerification/service.ts +++ b/src/pages/DataVerification/service.ts @@ -2,16 +2,16 @@ import request from '@/utils/request'; export async function handleGetAccountList(params: any) { - const data = await request(`/Verification/GetEndaccountList`, { - method: 'GET', - params - }) + const data = await request(`/Verification/GetEndaccountList`, { + method: 'GET', + params + }) - if (data.Result_Code === 500) { - return [] - } + if (data.Result_Code === 500) { + return [] + } - return data.Result_Data + return data.Result_Data } // 服务区下面的门店列表 export async function handleGetServiceShopList(params: any) { @@ -46,36 +46,36 @@ export async function handleGetAccountDetail(params: any) { // 获取流水冲正的数据 export async function handleGetSupplement(params: any) { - const data = await request(`/Verification/GetEndaccountSupplement`, { - method: 'GET', - params - }) + const data = await request(`/Verification/GetEndaccountSupplement`, { + method: 'GET', + params + }) - if (data.Result_Code === 500) { - return [] - } + if (data.Result_Code === 500) { + return [] + } - return data.Result_Data + return data.Result_Data } // 财务审核 主任复核 驳回 export async function submitEndaccountState(params: any) { - return request(`/Verification/SubmitEndaccountState`, { + return request(`/Verification/SubmitEndaccountState`, { method: 'POST', data: params, }) } // 日结数据校验 export async function dailyVerifyEndaccount(params: any) { - return request(`/Verification/VerifyEndaccount`, { + return request(`/Verification/VerifyEndaccount`, { method: 'POST', data: params, }) } // 批量审核 export async function handleBatchReview(params: any) { - return request(`/Verification/ApproveEndaccount`, { + return request(`/Verification/ApproveEndaccount`, { method: 'POST', data: params, }) @@ -83,7 +83,7 @@ export async function handleBatchReview(params: any) { // 日结账期异常处理 export async function handleDailyException(params: any) { - return request(`/Verification/ExceptionHandling`, { + return request(`/Verification/ExceptionHandling`, { method: 'POST', data: params, }) @@ -94,12 +94,12 @@ export async function handleDailyException(params: any) { export async function handleGetEndaccountHisList(params: any) { const data = await request(`/Verification/GetEndaccountHisList`, { - method: 'GET', - params + method: 'GET', + params }) if (data.Result_Code === 500) { - return [] + return [] } return data.Result_Data.List @@ -109,12 +109,12 @@ export async function handleGetEndaccountHisList(params: any) { export async function handleGetSuppEndaccountList(params: any) { const data = await request(`/Verification/GetSuppEndaccountList`, { - method: 'GET', - params + method: 'GET', + params }) if (data.Result_Code === 500) { - return [] + return [] } return data.Result_Data.List @@ -125,12 +125,12 @@ export async function handleGetSuppEndaccountList(params: any) { export async function handleGetServerpartShopList(params: any) { const data = await request(`/BaseInfo/GetServerpartShopList`, { - method: 'POST', - data: params + method: 'POST', + data: { ...params, requestEncryption: true } }) if (data.Result_Code === 500) { - return [] + return [] } return data.Result_Data.List diff --git a/src/pages/Setting/Module/index.tsx b/src/pages/Setting/Module/index.tsx index f1ebf15..1bd3526 100644 --- a/src/pages/Setting/Module/index.tsx +++ b/src/pages/Setting/Module/index.tsx @@ -132,17 +132,17 @@ const DataDictionary: React.FC<{ currentUser: CurrentUser }> = (props) => { 2: { text: '隐藏', status: 'warning' }, }, }, - { - title: '菜单状态', - dataIndex: 'MenuStatus', - // hideInSearch: true, - hideInTable: true, - valueEnum: { - 0: { text: '无效', status: 'Default' }, - 1: { text: '有效', status: 'Processing' }, - 2: { text: '隐藏', status: 'warning' }, - }, - }, + // { + // title: '菜单状态', + // dataIndex: 'MenuStatus', + // // hideInSearch: true, + // hideInTable: true, + // valueEnum: { + // 0: { text: '无效', status: 'Default' }, + // 1: { text: '有效', status: 'Processing' }, + // 2: { text: '隐藏', status: 'warning' }, + // }, + // }, { title: '说明', dataIndex: 'SYSTEMMENU_DESC', @@ -325,7 +325,8 @@ const DataDictionary: React.FC<{ currentUser: CurrentUser }> = (props) => { const data: any = await getSystemMenu({ ...params, ShowModule: true, - SystemMenuPID: currentUser?.ID === 4653 ? '95' : '-1' + SystemMenuPID: currentUser?.ID === 4653 ? '95' : '-1', + MenuStatus: "1,2" }) setMenuTree(data) diff --git a/src/pages/Setting/OperationLog/index.tsx b/src/pages/Setting/OperationLog/index.tsx index 955b818..cf1caab 100644 --- a/src/pages/Setting/OperationLog/index.tsx +++ b/src/pages/Setting/OperationLog/index.tsx @@ -39,6 +39,8 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => { const [tableLoading, setTableLoading] = useState(false) // 判断是否是第一次 const [isFirst, setIsFirst] = useState(true) + // 导出excel的加载 + const [exportExcelLoading, setExportExcelLoading] = useState(false) const [columnsStateMap, setColumnsStateMap] = useState({ @@ -179,16 +181,16 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => { dataIndex: 'SOURCE_PLATFORM', valueType: 'select', valueEnum: { - "驿商云平台": "驿商云平台", - "数智化看板": "数智化看板", - "驿行畅旅": "驿行畅旅", - "驿付商家版": "驿付商家版", - "微信公众号": "微信公众号", - "驿商云客户端": "驿商云客户端", + // "驿商云平台": "驿商云平台", + // "数智化看板": "数智化看板", + // "驿行畅旅": "驿行畅旅", + // "驿付商家版": "驿付商家版", + // "微信公众号": "微信公众号", + // "驿商云客户端": "驿商云客户端", "彩云驿出行": "彩云驿出行", "出行平台": "出行平台", }, - initialValue: currentUser?.ProvinceCode === "530000" ? '出行平台' : '驿商云平台' + initialValue: currentUser?.ProvinceCode === "530000" ? '出行平台' : '' }, { title: '操作系统', @@ -253,17 +255,17 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => { let params: any = { BEHAVIORRECORD_TIME: moment(res.BEHAVIORRECORD_TIME._d).format('YYYY-MM-DD'), SOURCE_PLATFORM: res.SOURCE_PLATFORM, - BEHAVIORRECORD_TYPE: res.BEHAVIORRECORD_TYPE, + BEHAVIORRECORD_TYPES: res.BEHAVIORRECORD_TYPE, ...res } - + setExportExcelLoading(true) setTableLoading(true) const req: any = { SearchParameter: { BEHAVIORRECORD_TIME_Start: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'), BEHAVIORRECORD_TIME_End: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'), SOURCE_PLATFORMS: params?.SOURCE_PLATFORM, - // BEHAVIORRECORD_TYPE: params?.BEHAVIORRECORD_TYPE + BEHAVIORRECORD_TYPES: params?.BEHAVIORRECORD_TYPE, }, SortStr: 'BEHAVIORRECORD_TIME desc', KeyWord: { @@ -287,7 +289,7 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => { BEHAVIORRECORD_TIME_Start: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'), BEHAVIORRECORD_TIME_End: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'), SOURCE_PLATFORMS: params?.SOURCE_PLATFORM, - // BEHAVIORRECORD_TYPE: params?.BEHAVIORRECORD_TYPE + BEHAVIORRECORD_TYPES: params?.BEHAVIORRECORD_TYPE, }, SortStr: 'BEHAVIORRECORD_TIME desc', KeyWord: { @@ -299,6 +301,8 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => { } const allData = await handleGetBEHAVIORRECORDList(allReq) setTableData(allData.List) + setReqDetailList(allData.List) + setExportExcelLoading(false) setIsFirst(false) } @@ -404,6 +408,7 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => { , + // , ] : []; }} /> diff --git a/src/pages/account/setting/components/SecurityView.tsx b/src/pages/account/setting/components/SecurityView.tsx index daf2ea5..ac64980 100644 --- a/src/pages/account/setting/components/SecurityView.tsx +++ b/src/pages/account/setting/components/SecurityView.tsx @@ -116,9 +116,14 @@ const SecurityView: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) const newValue = { ...value, USER_ID_Encrypted: currentUser?.ID_Encrypted } let success = null if (changeType === 'password') { + if (newValue.NewPassword !== newValue.ComfirmPassword) { + message.error('两次输入的密码不一致') + return + } + delete newValue.ComfirmPassword - - success = await handelResetPassWord( {...newValue, DataType: 1000} ) + + success = await handelResetPassWord({ ...newValue, DataType: 1000 }) } else { success = await handleMobilePhone(newValue as CloudChangeUserModel) } diff --git a/src/pages/basicManage/highwayHeadlines/service.ts b/src/pages/basicManage/highwayHeadlines/service.ts index 59b9014..3fa4f5f 100644 --- a/src/pages/basicManage/highwayHeadlines/service.ts +++ b/src/pages/basicManage/highwayHeadlines/service.ts @@ -22,9 +22,9 @@ export async function handleGetNOTICEINFOList(params?: any) { // 编辑和新增高速头条 export async function handleSynchroNOTICEINFO(params?: any) { - const data = await request(`/Notice/SynchroNOTICEINFO`, { + const data = await request(`/WisdomServerpart/SynchroNOTICEINFO`, { method: 'POST', - data: params, + data: { ...params, requestEncryption: true }, }); if (data.Result_Code !== 100) { @@ -36,9 +36,9 @@ export async function handleSynchroNOTICEINFO(params?: any) { // 删除 export async function handleDeleteNOTICEINFO(params?: any) { - const data = await request(`/Notice/DeleteNOTICEINFO`, { - method: 'GET', - params, + const data = await request(`/WisdomServerpart/DeleteNOTICEINFO`, { + method: 'POST', + data: { ...params, requestEncryption: true }, }); if (data.Result_Code !== 100) { diff --git a/src/pages/operatingMerchants/MerchantInformation/index.tsx b/src/pages/operatingMerchants/MerchantInformation/index.tsx index 3d6b3c7..0edb69c 100644 --- a/src/pages/operatingMerchants/MerchantInformation/index.tsx +++ b/src/pages/operatingMerchants/MerchantInformation/index.tsx @@ -1111,6 +1111,8 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = if (!selectAssociationServerpart) { return } + console.log('selectAssociationServerpartselectAssociationServerpart', selectAssociationServerpart); + const req: any = { SearchParameter: { SERVERPART_IDS: selectAssociationServerpart, @@ -1124,7 +1126,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = }, PageIndex: 1, PageSize: 999999, - SortStr: "SHOPTRADE,SHOPSHORTNAME,SHOPREGION,SERVERPART_CODE", + SortStr: "SHOPTRADE,SHOPSHORTNAME,SHOPREGION", } const data = await handleGetServerpartShopList(req) console.log('datadatadatadatadata', data); diff --git a/src/pages/travelMember/ActiveMemberStatistics/index.tsx b/src/pages/travelMember/ActiveMemberStatistics/index.tsx index e0d982e..7b1e35f 100644 --- a/src/pages/travelMember/ActiveMemberStatistics/index.tsx +++ b/src/pages/travelMember/ActiveMemberStatistics/index.tsx @@ -42,8 +42,8 @@ const ActiveMemberStatistics: React.FC<{ currentUser: CurrentUser | undefined }> let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList') - let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj') - let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList') + let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObjIsAllOK') + let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNListIsAllOK') const handleGetData = async (formData?: any) => { diff --git a/src/pages/travelMember/BuriedPointConfig/index.tsx b/src/pages/travelMember/BuriedPointConfig/index.tsx index 5c18aa7..ccee4a4 100644 --- a/src/pages/travelMember/BuriedPointConfig/index.tsx +++ b/src/pages/travelMember/BuriedPointConfig/index.tsx @@ -143,20 +143,20 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p ellipsis: true, hideInSearch: true, }, - { - dataIndex: 'ISSHOW', - // title: '小程序埋点是显示', - title: '有效状态', - align: 'center', - width: 150, - ellipsis: true, - hideInSearch: true, - valueType: "select", - valueEnum: { - "1": "有效", - "0": "无效" - } - }, + // { + // dataIndex: 'ISSHOW', + // // title: '小程序埋点是显示', + // title: '有效状态', + // align: 'center', + // width: 150, + // ellipsis: true, + // hideInSearch: true, + // valueType: "select", + // valueEnum: { + // "1": "有效", + // "0": "无效" + // } + // }, { dataIndex: 'UPDATE_STAFF_NAME', title: '修改人员名称', @@ -224,6 +224,10 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p } else { message.success('删除成功!'); actionRef.current?.reload() + formRef.current?.resetFields(); + setCurrentRow(undefined); + handleConfirmLoading(false) + handleModalVisible(false) } }; @@ -236,7 +240,8 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p ...res, UPDATE_STAFF_ID: currentUser?.ID, UPDATE_STAFF_NAME: currentUser?.Name, - UPDATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss') + UPDATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + ISSHOW: 1 } } else { req = { @@ -246,9 +251,12 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p CREATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), UPDATE_STAFF_ID: currentUser?.ID, UPDATE_STAFF_NAME: currentUser?.Name, - UPDATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss') + UPDATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + ISSHOW: 1 } } + console.log('reqreq', req); + const data = await handeSynchroWECHATAPPBURYPOINT(req) handleConfirmLoading(false) if (data.Result_Code === 100) { @@ -282,7 +290,8 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p SearchParameter: { // WECHATAPP_APPID: "wxee018fb96955552a" WECHATAPP_APPID: params?.WECHATAPP_APPID || "", - ISSHOW: 1 + ISSHOW: 1, + WECHATAPPBURYPOINT_STATE: 1 }, PageIndex: 1, PageSize: 999, @@ -384,8 +393,6 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p footer={ { - console.log('currentRow', currentRow); - await handelDelete(currentRow?.WECHATAPPBURYPOINT_ID) }} handleCancel={() => { @@ -464,6 +471,11 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p name="WECHATAPP_APPID" label="小程序名称" options={WECHATAPP_APPID} + fieldProps={{ + onChange: (e, option) => { + formRef.current?.setFieldsValue({ WECHATAPPSIGN_NAME: option?.label || "" }) + } + }} /> @@ -472,13 +484,13 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p label="小程序名称" /> - + {/* - + */} diff --git a/src/pages/travelMember/BusinessActivityStatistics/index.tsx b/src/pages/travelMember/BusinessActivityStatistics/index.tsx index 0bd8e84..2310084 100644 --- a/src/pages/travelMember/BusinessActivityStatistics/index.tsx +++ b/src/pages/travelMember/BusinessActivityStatistics/index.tsx @@ -44,8 +44,8 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList') - let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj') - let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList') + let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObjIsAllOK') + let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNListIsAllOK') const handleGetData = async (formData?: any) => { diff --git a/src/pages/travelMember/ConsumptionRecordSearch/index.tsx b/src/pages/travelMember/ConsumptionRecordSearch/index.tsx index b30617f..e6a1cab 100644 --- a/src/pages/travelMember/ConsumptionRecordSearch/index.tsx +++ b/src/pages/travelMember/ConsumptionRecordSearch/index.tsx @@ -455,8 +455,9 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? OWNERUNIT_ID: 911, CONSUMPTIONRECORD_DATE_Start: params?.CONSUMPTIONRECORD_DATE_Start || "", CONSUMPTIONRECORD_DATE_End: params?.CONSUMPTIONRECORD_DATE_End || "", - CONSUMPTIONRECORD_TYPE: params?.CONSUMPTIONRECORD_TYPE === '0' ? '' : params?.CONSUMPTIONRECORD_TYPE, - CONSUMPTIONRECORD_STATES: '1010,2000,2010,3000,8000,8010,8020,8900,8999', + CONSUMPTIONRECORD_TYPES: params?.CONSUMPTIONRECORD_TYPE === '0' ? '' : params?.CONSUMPTIONRECORD_TYPE, + // CONSUMPTIONRECORD_STATES: '1010,2000,2010,3000,8000,8010,8020,8900,8999', + CONSUMPTIONRECORD_STATES: params?.CONSUMPTIONRECORD_STATE || "", MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: params?.current, diff --git a/src/pages/travelMember/ConsumptionTypeConfig/index.tsx b/src/pages/travelMember/ConsumptionTypeConfig/index.tsx index 56afe0d..025c189 100644 --- a/src/pages/travelMember/ConsumptionTypeConfig/index.tsx +++ b/src/pages/travelMember/ConsumptionTypeConfig/index.tsx @@ -131,25 +131,25 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> ellipsis: true, hideInSearch: true, }, - { - dataIndex: 'FIELDENUM_STATUS', - title: '有效状态', - align: 'center', - width: 120, - ellipsis: true, - valueType: "select", - // valueEnum: { - // "1": "有效", - // "0": "无效" - // }, - fieldProps: { - options: [ - { label: '有效', value: "1" }, - { label: '无效', value: "0" } - ] - }, - initialValue: "1" - }, + // { + // dataIndex: 'FIELDENUM_STATUS', + // title: '有效状态', + // align: 'center', + // width: 120, + // ellipsis: true, + // valueType: "select", + // // valueEnum: { + // // "1": "有效", + // // "0": "无效" + // // }, + // fieldProps: { + // options: [ + // { label: '有效', value: "1" }, + // { label: '无效', value: "0" } + // ] + // }, + // initialValue: "1" + // }, { dataIndex: 'FIELDENUM_DESC', title: '备注说明', @@ -225,12 +225,14 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> req = { ...currentRow, ...res, + FIELDENUM_STATUS: 1 } } else { req = { ...res, FIELDEXPLAIN_ID: FIELDEXPLAIN_ID, FIELDENUM_PID: -1, + FIELDENUM_STATUS: 1 } } const data = await handeSynchroFIELDENUM(req) @@ -271,7 +273,7 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> FIELDEXPLAIN_FIELD: 'CONSUMPTIONRECORD_TYPE', FIELDEXPLAIN_ID: "", FIELDENUM_PID: "", - FIELDENUM_STATUS: params?.FIELDENUM_STATUS, + FIELDENUM_STATUS: 1, SearchKey: "" } const data = await handeGetNestingFIELDENUMList(req); @@ -337,7 +339,7 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> onFocus={() => { }} onBlur={() => { }} > - {currentRow ? '更新会员等级类别' : '新建会员等级类别'} + {currentRow ? '更新消费类型' : '新建消费类型'}
} destroyOnClose={true} @@ -493,16 +495,16 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> - + {/* } ]} /> - + */} = ellipsis: true, hideInSearch: true, }, - { - dataIndex: 'FIELDENUM_STATUS', - title: '有效状态', - align: 'center', - width: 120, - ellipsis: true, - valueType: "select", - valueEnum: { - "1": "有效", - "0": "无效" - }, - initialValue: "1" - }, + // { + // dataIndex: 'FIELDENUM_STATUS', + // title: '有效状态', + // align: 'center', + // width: 120, + // ellipsis: true, + // valueType: "select", + // valueEnum: { + // "1": "有效", + // "0": "无效" + // }, + // initialValue: "1" + // }, { dataIndex: 'FIELDENUM_DESC', title: '备注说明', @@ -220,16 +220,20 @@ const MEMBERSHIPTYPEConfig: React.FC<{ currentUser: CurrentUser | undefined }> = req = { ...currentRow, ...res, + FIELDENUM_STATUS: 1 } } else { req = { ...res, FIELDEXPLAIN_ID: FIELDEXPLAIN_ID, FIELDENUM_PID: -1, + FIELDENUM_STATUS: 1 } } const data = await handeSynchroFIELDENUM(req) handleConfirmLoading(false) + console.log('datadatadata', data); + if (data.Result_Code === 100) { message.success("新增成功!") handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}【${data.Result_Data.FIELDENUM_NAME}】`) @@ -267,7 +271,7 @@ const MEMBERSHIPTYPEConfig: React.FC<{ currentUser: CurrentUser | undefined }> = FIELDEXPLAIN_FIELD: 'MEMBERSHIP_TYPE', FIELDEXPLAIN_ID: "", FIELDENUM_PID: "", - FIELDENUM_STATUS: params?.FIELDENUM_STATUS, + FIELDENUM_STATUS: 1, SearchKey: "" } const data = await handeGetNestingFIELDENUMList(req); @@ -346,7 +350,7 @@ const MEMBERSHIPTYPEConfig: React.FC<{ currentUser: CurrentUser | undefined }> = onFocus={() => { }} onBlur={() => { }} > - {currentRow ? '更新售后类别' : '新建售后类别'} + {currentRow ? '更新会员类型' : '新建会员类型'} } destroyOnClose={true} @@ -501,16 +505,16 @@ const MEMBERSHIPTYPEConfig: React.FC<{ currentUser: CurrentUser | undefined }> = - + {/* = } ]} /> - + */} = (props) ellipsis: true, hideInSearch: true, }, - { - dataIndex: 'FIELDENUM_STATUS', - title: '有效状态', - align: 'center', - width: 120, - ellipsis: true, - valueType: "select", - valueEnum: { - "1": "有效", - "0": "无效" - }, - initialValue: "1" - }, + // { + // dataIndex: 'FIELDENUM_STATUS', + // title: '有效状态', + // align: 'center', + // width: 120, + // ellipsis: true, + // valueType: "select", + // valueEnum: { + // "1": "有效", + // "0": "无效" + // }, + // initialValue: "1" + // }, { dataIndex: 'FIELDENUM_DESC', title: '备注说明', @@ -220,12 +220,14 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) req = { ...currentRow, ...res, + FIELDENUM_STATUS: 1 } } else { req = { ...res, FIELDEXPLAIN_ID: FIELDEXPLAIN_ID, FIELDENUM_PID: -1, + FIELDENUM_STATUS: 1 } } const data = await handeSynchroFIELDENUM(req) @@ -267,7 +269,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) FIELDEXPLAIN_FIELD: 'GROWTH_TYPE', FIELDEXPLAIN_ID: "", FIELDENUM_PID: "", - FIELDENUM_STATUS: params?.FIELDENUM_STATUS, + FIELDENUM_STATUS: 1, SearchKey: "" } const data = await handeGetNestingFIELDENUMList(req); @@ -304,7 +306,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) handleModalVisible(true); }} > - 售后服务类别 + 成长值枚举 , ], }} @@ -346,7 +348,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) onFocus={() => { }} onBlur={() => { }} > - {currentRow ? '更新售后类别' : '新建售后类别'} + {currentRow ? '更新成长值枚举' : '新建成长值枚举'} } destroyOnClose={true} @@ -501,7 +503,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) = (props) ]} /> - + {/* = (props) } ]} /> - + */} let GROWTHTYPEList = session.get('GROWTHTYPEList') let GROWTHTYPEObj = session.get('GROWTHTYPEObj') let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj') - let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList') + let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNListIsAllOK') let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList') @@ -183,24 +183,24 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> // align: 'center', // hideInSearch: true, // }, - { - dataIndex: 'GROWTHSETTING_STATE', - title: '有效状态', - width: 120, - align: 'center', - valueType: 'select', - // valueEnum: { - // "1": "有效", - // "0": "无效", - // }, - initialValue: "1", - fieldProps: { - options: [ - { label: '有效', value: "1" }, - { label: '无效', value: "0" } - ] - } - }, + // { + // dataIndex: 'GROWTHSETTING_STATE', + // title: '有效状态', + // width: 120, + // align: 'center', + // valueType: 'select', + // // valueEnum: { + // // "1": "有效", + // // "0": "无效", + // // }, + // initialValue: "1", + // fieldProps: { + // options: [ + // { label: '有效', value: "1" }, + // { label: '无效', value: "0" } + // ] + // } + // }, // { // dataIndex: 'STAFF_NAME', // title: '操作人员', @@ -341,12 +341,14 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> reqList.push({ ...req, ...newValue, + GROWTHSETTING_STATE: 1, MEMBERSHIP_TYPE: nowItem.value }) reqListUpdateMsg.push(`${nowItem.label}【${GROWTHTYPEObj[newValue.GROWTHSETTING_TYPE]}】${MEMBERSHIPLEVELYNObj[newValue.PROMOTION_LEVEL]}`) } else { req = { ...newValue, + GROWTHSETTING_STATE: 1, MEMBERSHIP_TYPE: nowItem.value } reqList.push(req) @@ -447,7 +449,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> searchParameter: { PROVINCE_CODE: currentUser?.ProvinceCode || "", OWNERUNIT_ID: 911, - GROWTHSETTING_STATE: params?.GROWTHSETTING_STATE, + GROWTHSETTING_STATE: 1, MEMBERSHIP_TYPES: params?.MEMBERSHIP_TYPE === 1 ? '' : params?.MEMBERSHIP_TYPE || "" }, SortStr: "MEMBERSHIP_TYPE,MEMBERSHIP_LEVEL,PROMOTION_LEVEL desc", @@ -903,7 +905,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> /> - + {/* ]} initialValue={1} /> - + */} = (props) => const [showExportTable, setShowExportTable] = useState(false) // 查询的条件 const [searchParams, setSearchParams] = useState() - // 头条类型 对象格式 + // 招商类型 对象格式 const [NOTICEINFO_TYPES, setNOTICEINFO_TYPESOBJ] = useState() const [NOTICEINFO_TYPESList, setNOTICEINFO_TYPESList] = useState() // 显示新增窗口 @@ -84,7 +84,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) => }, }, // { - // title:
头条类型
, + // title:
招商类型
, // dataIndex: 'NOTICEINFO_TYPES', // valueType: 'treeSelect', // align: 'center', @@ -159,6 +159,22 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) => align: 'center', ellipsis: true }, + { + title: '开始时间', + dataIndex: "START_DATE", + hideInSearch: true, + width: 150, + align: 'center', + ellipsis: true + }, + { + title: '结束时间', + dataIndex: "END_DATE", + hideInSearch: true, + width: 150, + align: 'center', + ellipsis: true + }, { title: '备注说明', dataIndex: "NOTICEINFO_DESC", @@ -198,7 +214,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) => - // 新增头条 + // 新增招商 const handleAddHeadlines = async (obj: any) => { console.log('obj', obj); @@ -237,7 +253,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) => const formData = new FormData(); fileList.forEach((item: any) => { formData.append('files[]', item.originFileObj); - formData.append('ImageName', item.name); + // formData.append('ImageName', item.name); }) formData.append('TableType', '1401'); formData.append('TableId', data.Result_Data.NOTICEINFO_ID.toString()); @@ -264,7 +280,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) => } - // 删除头条 + // 删除招商 const handleDeleteLine = async (id: any) => { const data = await handleDeleteNOTICEINFO({ NOTICEINFOId: id }) if (data.Result_Code === 100) { @@ -321,13 +337,14 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) => const req: any = { SearchParameter: { NOTICEINFO_TYPES: 1050, - // START_DATE_Start: params?.StartDate, - // END_DATE_Start: params?.EndDate, + START_DATE_End: params?.EndDate, + END_DATE_Start: params?.StartDate, PROVINCE_CODE: currentUser?.ProvinceCode, NOTICEINFO_STATE: 1 }, PageIndex: 1, PageSize: 999999, + SortStr: 'OPERATE_DATE desc', } setSearchParams(params) const data = await handleGetNOTICEINFOList(req) @@ -342,7 +359,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) => actions: [ + }}>新增招商信息 ] }} /> @@ -366,7 +383,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) => = (props) => { const data = await getFieldEnumTree({ FieldExplainField: 'NOTICEINFO_TYPE' }) @@ -449,11 +466,11 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) => @@ -516,7 +533,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) => @@ -529,7 +546,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) => = (props overflowY: 'auto', }} destroyOnClose - title={currentRow?.PICTURE_ID ? '编辑图片' : "新增卡券"} + title={currentRow?.PICTURE_ID ? '编辑图片' : "新增图片"} onOk={() => { ModalFormRef?.current?.validateFields().then(async (res) => { await handleSynchroImage(res) @@ -402,7 +402,21 @@ const LibraryInformationManager: React.FC<{ currentUser: CurrentUser }> = (props } else { message.error("您上传的图片不存在.") } - } + }, + onChange: async (info: any) => { + if (info.file.status === 'removed') { + const index = fileList.findIndex(n => n.uid === info.file.uid); // 如果在待上传列表中找到,则说明当前图片没有上传服务器,可直接删除 + if (!info.file?.deletepath) { + + const newFileList = fileList.slice(); + newFileList.splice(index, 1); + setFileList(newFileList) + return + } + + + } + }, }} /> diff --git a/src/pages/travelMember/LostandFoundAPPliance/index.tsx b/src/pages/travelMember/LostandFoundAPPliance/index.tsx index c1dc609..de0f37e 100644 --- a/src/pages/travelMember/LostandFoundAPPliance/index.tsx +++ b/src/pages/travelMember/LostandFoundAPPliance/index.tsx @@ -392,7 +392,7 @@ const LostandFoundAPPliance: React.FC<{ currentUser: CurrentUser }> = (props) => } = (props) => { // ellipsis: true, // valueEnum: brandObj // }, - { - dataIndex: 'BRAND_STATE', - title: '有效状态', - align: 'center', - width: 120, - valueType: 'select', - fieldProps: { - options: [ - { label: '有效', value: "1" }, - { label: '无效', value: "0" } - ] - }, - initialValue: "1" - }, + // { + // dataIndex: 'BRAND_STATE', + // title: '有效状态', + // align: 'center', + // width: 120, + // valueType: 'select', + // fieldProps: { + // options: [ + // { label: '有效', value: "1" }, + // { label: '无效', value: "0" } + // ] + // }, + // initialValue: "1" + // }, { dataIndex: 'BRAND_DESC', title: '品牌介绍', @@ -249,6 +249,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { STAFF_ID: currentUser?.ID, STAFF_NAME: currentUser?.Name, OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + BRAND_STATE: 1 } } else { req = { @@ -259,6 +260,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { STAFF_ID: currentUser?.ID, STAFF_NAME: currentUser?.Name, OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + BRAND_STATE: 1 } } @@ -322,7 +324,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { OWNERUNIT_ID: currentUser?.OwnerUnitId, PROVINCE_CODE: currentUser?.ProvinceCode, BRAND_TYPE: params?.BRAND_TYPE, - BRAND_STATE: params?.BRAND_STATE === '-1' ? '' : params?.BRAND_STATE, + BRAND_STATE: 1, BRAND_CATEGORY: 2000 }, keyWord: { @@ -440,6 +442,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { }} footer={ { await handelDelete(currentRow?.BRAND_ID) @@ -473,6 +476,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { }} onFinish={async (values) => { let newValue: any = { ...values }; + handleConfirmLoading(true) if (currentRow) { // 编辑数据 newValue = { ...values, BRAND_ID: currentRow.BRAND_ID }; @@ -539,7 +543,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { label="品牌名称" /> - + {/* = (props) => { { label: "无效", value: 0 }, ]} /> - + */} - }
= (props) => { const { currentUser, isComponent, searchReq } = props @@ -26,7 +29,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolea const actionRef = useRef(); const formRef = useRef(); const modalRef = useRef(); - + const downloadBtnRef = useRef() // 查询的条件 const [searchParams, setSearchParams] = useState() const [currentRow, setCurrentRow] = useState(); @@ -39,6 +42,13 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolea const [currentSearchText, setCurrentSearchText] = useState('') // 导出的表格数据 const [reqDetailList, setReqDetailList] = useState() + // 导出的加载效果 + const [showLoading, setShowLoading] = useState(false) + const [MEMBERSHIP_TARGETOBJ, setMEMBERSHIP_TARGETOBJ] = useState() + // 是否显示打印的表格 + const [showExportTable, setShowExportTable] = useState(false) + + const [printIndex, setPrintIndex] = useState(new Date().getTime()) const onDraggaleStart = (event, uiData) => { const { clientWidth, clientHeight } = window.document.documentElement; @@ -120,20 +130,20 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolea initialValue: '0', hideInTable: true, }, - { - title: "支付方式", - dataIndex: "PAYMETHOD", - valueType: "select", - valueEnum: { - "0": "全部", - "支付宝": "支付宝", - "微信": "微信", - "积分兑换": "积分兑换", - "余额支付": "余额支付", - }, - initialValue: '0', - hideInTable: true, - }, + // { + // title: "支付方式", + // dataIndex: "PAYMETHOD", + // valueType: "select", + // valueEnum: { + // "0": "全部", + // "支付宝": "支付宝", + // "微信": "微信", + // "积分兑换": "积分兑换", + // "余额支付": "余额支付", + // }, + // initialValue: '0', + // hideInTable: true, + // }, { title: "序号", dataIndex: "index", @@ -668,9 +678,73 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolea }, ] + const exportTable = (e) => { + e.stopPropagation(); // 防止Collapse组件收起 + const main = document.getElementsByClassName(`MallOrderManage${printIndex}`)[0] + const thead = main.querySelector('thead').cloneNode(true); // 深克隆DOM节点 + const tbody = main.querySelector('tbody').cloneNode(true); // 深克隆DOM节点 + const container = document.querySelector('#hiddenBox'); + + const tempTable = document.createElement('table'); + tempTable.appendChild(thead); + tempTable.appendChild(tbody); + + tempTable.setAttribute('id', 'table-to-xls-MallOrderManage'); // 给table添加id,值与按钮上的table字段对应 + + container.appendChild(tempTable); // 把创建的节点添加到页面容器中 + + setShowLoading(false) + + downloadBtnRef.current.handleDownload(); + setShowExportTable(false) + tempTable.remove() // 防止重复打印一个内容 + } + return (
+ { + showLoading ? +
+
+ + 数据导出中... +
+
: '' + } +
+ { + showExportTable && reqDetailList && reqDetailList.length > 0 ? + : '' + } +
+
0 ? params?.MEMBERSHIP_TARGET.toString() : "", + PAYMETHOD: params?.PAYMETHOD || "" // MERCHANTS_IDS: currentUser?.SupplierID }, PageIndex: 1, @@ -733,26 +808,56 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolea return { data: [], success: true } }} toolbar={{ - // actions: [ - // - // // } - // // ) - // }}>导出Excel, - // - // ] + // , + // + ] }} />
diff --git a/src/pages/travelMember/MemberAddress/components/addressDetail.tsx b/src/pages/travelMember/MemberAddress/components/addressDetail.tsx index 20ac000..375e0ad 100644 --- a/src/pages/travelMember/MemberAddress/components/addressDetail.tsx +++ b/src/pages/travelMember/MemberAddress/components/addressDetail.tsx @@ -86,28 +86,28 @@ const AddressDetail = ({ currentBigRow, currentUser, isComponent }: DetailProps) ellipsis: true, hideInSearch: true, }, - { - dataIndex: 'RECEIVE_PROVINCE', - title: '省/直辖市', - width: 120, - align: 'center', - ellipsis: true, - hideInSearch: true, - }, - { - dataIndex: 'RECEIVE_CITY', - title: '城市/直辖市', - width: 150, - align: 'center', - hideInSearch: true, - }, - { - dataIndex: 'RECEIVE_COUNTY', - title: '区/县', - width: 150, - align: 'center', - hideInSearch: true, - }, + // { + // dataIndex: 'RECEIVE_PROVINCE', + // title: '省/直辖市', + // width: 120, + // align: 'center', + // ellipsis: true, + // hideInSearch: true, + // }, + // { + // dataIndex: 'RECEIVE_CITY', + // title: '省市区', + // width: 350, + // align: 'center', + // hideInSearch: true, + // }, + // { + // dataIndex: 'RECEIVE_COUNTY', + // title: '区/县', + // width: 150, + // align: 'center', + // hideInSearch: true, + // }, { dataIndex: 'ADDRESS', title: '收货地址', @@ -317,8 +317,6 @@ const AddressDetail = ({ currentBigRow, currentUser, isComponent }: DetailProps) const req = { SearchParameter: { MEMBERSHIP_ID: currentBigRow?.MEMBERSHIP_ID, - PROVINCE_CODE: currentUser?.ProvinceCode || "", - OWNERUNIT_ID: 911, ISVALID: 1 }, PageIndex: params.current, @@ -461,7 +459,7 @@ const AddressDetail = ({ currentBigRow, currentUser, isComponent }: DetailProps) label="手机号码" /> - + {/* - + */} diff --git a/src/pages/travelMember/MemberAddress/index.tsx b/src/pages/travelMember/MemberAddress/index.tsx index 54eb8ef..b6af52b 100644 --- a/src/pages/travelMember/MemberAddress/index.tsx +++ b/src/pages/travelMember/MemberAddress/index.tsx @@ -522,7 +522,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props const req = { // PROVINCE_CODE: currentUser?.ProvinceCode || "", - OwnerUnitId: currentUser?.OwnerUnitId || "", + OwnerUnitId: "911", Isvalid: 1, PageIndex: params.current, PageSize: params?.pageSize, diff --git a/src/pages/travelMember/MemberSummaryStatistics/index.tsx b/src/pages/travelMember/MemberSummaryStatistics/index.tsx index d9612a0..b7efbc2 100644 --- a/src/pages/travelMember/MemberSummaryStatistics/index.tsx +++ b/src/pages/travelMember/MemberSummaryStatistics/index.tsx @@ -485,7 +485,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } OWNERUNIT_ID: 911, POINT_TYPE: selectTab === 1 ? '' : selectTab === 2 ? '1' : selectTab === 3 ? '-1' : '', POINT_SOURCE: '', - MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET && searchParams?.MEMBERSHIP_TARGET.length > 0 ? searchParams?.MEMBERSHIP_TARGET.toString() : "" + MEMBERSHIP_TARGET: values?.MEMBERSHIP_TARGET && values?.MEMBERSHIP_TARGET.length > 0 ? values?.MEMBERSHIP_TARGET.toString() : "" }, keyWord: { Key: "MEMBERSHIP_NAME", diff --git a/src/pages/travelMember/MemberTagManage/index.tsx b/src/pages/travelMember/MemberTagManage/index.tsx index af0a96d..dc92525 100644 --- a/src/pages/travelMember/MemberTagManage/index.tsx +++ b/src/pages/travelMember/MemberTagManage/index.tsx @@ -133,26 +133,26 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro ellipsis: true, hideInSearch: true, }, - { - dataIndex: 'AUTOTYPE_VALID', - title: '有效状态', - align: 'center', - width: 120, - ellipsis: true, - valueType: "select", - // valueEnum: { - // "1": "有效", - // "0": "无效" - // }, - initialValue: "1", - fieldProps: { - options: [ - { label: '有效', value: "1" }, - { label: '无效', value: "0" } - ] - } + // { + // dataIndex: 'AUTOTYPE_VALID', + // title: '有效状态', + // align: 'center', + // width: 120, + // ellipsis: true, + // valueType: "select", + // // valueEnum: { + // // "1": "有效", + // // "0": "无效" + // // }, + // initialValue: "1", + // fieldProps: { + // options: [ + // { label: '有效', value: "1" }, + // { label: '无效', value: "0" } + // ] + // } - }, + // }, { dataIndex: 'AUTOTYPE_DESC', title: '备注说明', @@ -202,6 +202,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro STAFF_ID: currentUser?.ID, STAFF_NAME: currentUser?.Name, OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + AUTOTYPE_VALID: 1 } } else { req = { @@ -212,6 +213,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro STAFF_NAME: currentUser?.Name, OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), ADDTIME: moment().format('YYYY-MM-DD HH:mm:ss'), + AUTOTYPE_VALID: 1 } } const data = await handeSynchroAUTOTYPE(req) @@ -230,6 +232,22 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro } } + + const markDisabled = (nodes: any, disabledIds: any) => { + return nodes.map((node: any) => { + const copy = { ...node }; + + if (disabledIds.includes(copy.AUTOTYPE_ID)) { + copy.disabled = true; + } + + if (copy.children && Array.isArray(copy.children)) { + copy.children = markDisabled(copy.children, disabledIds); + } + return copy; + }); + }; + return ( = (pro AUTOTYPE_TYPEID: '2000', AUTOTYPE_PID: "", OWNERUNIT_ID: currentUser?.OwnerUnitId, - AUTOTYPE_VALID: params?.AUTOTYPE_VALID, + AUTOTYPE_VALID: 1, SearchKey: params?.searchText || "" } const data = await handeGetNestingAUTOTYPEList(req); console.log('datadatadatadatadata', data); setCurrentSearchText(params?.searchText || "") handleSetlogSave(`点击查询按钮`) + setTypeTreeData(data) if (data && data.length > 0) { - setTypeTreeData(data) return { data: data, success: true, total: data.length } } return { data: [], success: true } @@ -411,7 +429,8 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro request={async () => { if (typeTreeData && typeTreeData.length > 0) { let list: any = [{ AUTOTYPE_NAME: "默认类别", AUTOTYPE_ID: -1 }, ...typeTreeData] - return list + let res = markDisabled(list, currentRow?.AUTOTYPE_ID ? [currentRow?.AUTOTYPE_ID] : []) + return res } else { const req = { AUTOTYPE_TYPEID: '2000', @@ -422,9 +441,14 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro } const data = await handeGetNestingAUTOTYPEList(req); if (data && data.length > 0) { - data.unshirft({ AUTOTYPE_NAME: "默认类别", AUTOTYPE_ID: -1 }) + data.unshift({ AUTOTYPE_NAME: "默认类别", AUTOTYPE_ID: -1 }) + + let res = markDisabled(data, currentRow?.AUTOTYPE_ID ? [currentRow?.AUTOTYPE_ID] : []) + console.log('resresresres', res); + + setTypeTreeData(data) - return data + return res } else { return [{ AUTOTYPE_NAME: "默认类别", AUTOTYPE_ID: -1 }] } @@ -473,7 +497,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro /> - + {/* = (pro } ]} /> - + */} @@ -179,7 +179,7 @@ const LeftSelectMemberLevel = ({ setSelectedId, reload, actionRef, currentUser,
} colSpan={!collapsible ? "300px" : "60px"} - title={!collapsible ? "请选择服务区" : ""} + title={!collapsible ? "请选择会员等级" : ""} headerBordered collapsed={collapsible} > diff --git a/src/pages/travelMember/MembershipLevelDistribution/index.tsx b/src/pages/travelMember/MembershipLevelDistribution/index.tsx index 84cbe23..ad385b4 100644 --- a/src/pages/travelMember/MembershipLevelDistribution/index.tsx +++ b/src/pages/travelMember/MembershipLevelDistribution/index.tsx @@ -25,7 +25,7 @@ const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefin // 显示详情抽屉 const [showDetailDrawer, setShowDetailDrawer] = useState(false) - let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj'); + let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObjIsAllOK'); let CONSUMPTIONRECORDTYPEObj = session.get('CONSUMPTIONRECORDTYPEObj') let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') // 当前查询的文字 @@ -356,11 +356,24 @@ const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefin }) console.log('selectedIdselectedIdselectedId', selectedId); + console.log('paramsparamsparams', params); + let allType: string = '' + if (MEMBERSHIPTYPEYNObj) { + for (let key in MEMBERSHIPTYPEYNObj) { + if (allType) { + allType += `,${key}` + } else { + allType = key + } + } + } + const req: any = { SearchParameter: { OWNERUNIT_ID: 911, MEMBERSHIP_LEVELS: selectedId, - MEMBERSHIP_STATE: params?.MEMBERSHIP_STATE, + MEMBERSHIP_STATE: 1000, + MEMBERSHIP_TYPES: params?.MEMBERSHIP_TYPE === '1' ? allType : params?.MEMBERSHIP_TYPE, }, keyWord: { Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE,CERTIFICATE_NUMBER,MEMBERSHIP_CARD,MEMBERSHIP_ADDRESS,PLATE_NUMBER", diff --git a/src/pages/travelMember/MembershipLevelManage/index.tsx b/src/pages/travelMember/MembershipLevelManage/index.tsx index 5dc0c60..ab72cce 100644 --- a/src/pages/travelMember/MembershipLevelManage/index.tsx +++ b/src/pages/travelMember/MembershipLevelManage/index.tsx @@ -131,26 +131,26 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }> ellipsis: true, hideInSearch: true, }, - { - dataIndex: 'FIELDENUM_STATUS', - title: '有效状态', - align: 'center', - width: 120, - ellipsis: true, - valueType: "select", - // valueEnum: { - // "1": "有效", - // "0": "无效" - // }, - initialValue: "1", - fieldProps: { - options: [ - { label: '有效', value: "1" }, - { label: '无效', value: "0" } - ] - } - - }, + // { + // dataIndex: 'FIELDENUM_STATUS', + // title: '有效状态', + // align: 'center', + // width: 120, + // ellipsis: true, + // valueType: "select", + // // valueEnum: { + // // "1": "有效", + // // "0": "无效" + // // }, + // hideInSearch: true, + // initialValue: "1", + // fieldProps: { + // options: [ + // { label: '有效', value: "1" }, + // { label: '无效', value: "0" } + // ] + // } + // }, { dataIndex: 'FIELDENUM_DESC', title: '备注说明', @@ -226,12 +226,14 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }> req = { ...currentRow, ...res, + FIELDENUM_STATUS: 1 } } else { req = { ...res, FIELDEXPLAIN_ID: FIELDEXPLAIN_ID, FIELDENUM_PID: -1, + FIELDENUM_STATUS: 1 } } const data = await handeSynchroFIELDENUM(req) @@ -272,7 +274,7 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }> FIELDEXPLAIN_FIELD: 'MEMBERSHIP_LEVEL_YN', FIELDEXPLAIN_ID: "", FIELDENUM_PID: "", - FIELDENUM_STATUS: params?.FIELDENUM_STATUS, + FIELDENUM_STATUS: 1, SearchKey: "" } const data = await handeGetNestingFIELDENUMList(req); @@ -503,7 +505,7 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }> ]} /> - + {/* } ]} /> - + */} 0 ? values.MEMBERSHIP_TARGET.toString() : "" }) actionRef.current?.reload() }} diff --git a/src/pages/travelMember/MembershipTypeStatistics/index.tsx b/src/pages/travelMember/MembershipTypeStatistics/index.tsx index 657e1c7..ee05cd7 100644 --- a/src/pages/travelMember/MembershipTypeStatistics/index.tsx +++ b/src/pages/travelMember/MembershipTypeStatistics/index.tsx @@ -452,7 +452,8 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined OPERATE_DATE_End: searchParams?.EndDate || "", OWNERUNIT_ID: 911, POINT_TYPE: typeTab === 1 ? '' : typeTab === 2 ? '1' : typeTab === 3 ? '-1' : '', - POINT_SOURCE: '' + POINT_SOURCE: '', + MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET || "" }, keyWord: { Key: "MEMBERSHIP_NAME", @@ -471,7 +472,8 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined OWNERUNIT_ID: 911, SCORESETTING_STATE: 1, GROWTH_SOURCES: "", - GROWTH_TYPE: selectTab === 4 ? '' : selectTab === 5 ? '1' : selectTab === 6 ? '-1' : '' + GROWTH_TYPE: selectTab === 4 ? '' : selectTab === 5 ? '1' : selectTab === 6 ? '-1' : '', + MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET || "" }, keyWord: { Key: "MEMBERSHIP_NAME", @@ -548,7 +550,8 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined handleGetTopData(StartDate, EndDate, values.MEMBERSHIP_TARGET) setSearchParams({ StartDate: StartDate, - EndDate: EndDate + EndDate: EndDate, + MEMBERSHIP_TARGET: values.MEMBERSHIP_TARGET && values.MEMBERSHIP_TARGET.length > 0 ? values.MEMBERSHIP_TARGET.toString() : "" }) actionRef.current?.reload() }} diff --git a/src/pages/travelMember/MerchantEvaluationManage/index.tsx b/src/pages/travelMember/MerchantEvaluationManage/index.tsx index 88abc0d..e929005 100644 --- a/src/pages/travelMember/MerchantEvaluationManage/index.tsx +++ b/src/pages/travelMember/MerchantEvaluationManage/index.tsx @@ -332,6 +332,7 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent COMMENT_ISVALID: 1, CREATE_DATE_Start: params?.CREATE_DATE_Start || "", CREATE_DATE_End: params?.CREATE_DATE_End || "", + SERVERPART_IDS: selectedId, }, PageIndex: 1, PageSize: 999999, diff --git a/src/pages/travelMember/OperationTypeConfig/index.tsx b/src/pages/travelMember/OperationTypeConfig/index.tsx index 91049c9..74d5320 100644 --- a/src/pages/travelMember/OperationTypeConfig/index.tsx +++ b/src/pages/travelMember/OperationTypeConfig/index.tsx @@ -133,25 +133,25 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> = ellipsis: true, hideInSearch: true, }, - { - dataIndex: 'FIELDENUM_STATUS', - title: '有效状态', - align: 'center', - width: 120, - ellipsis: true, - valueType: "select", - fieldProps: { - options: [ - { label: '有效', value: "1" }, - { label: '无效', value: "0" } - ] - }, - // valueEnum: { - // "1": "有效", - // "0": "无效" - // }, - initialValue: "1" - }, + // { + // dataIndex: 'FIELDENUM_STATUS', + // title: '有效状态', + // align: 'center', + // width: 120, + // ellipsis: true, + // valueType: "select", + // fieldProps: { + // options: [ + // { label: '有效', value: "1" }, + // { label: '无效', value: "0" } + // ] + // }, + // // valueEnum: { + // // "1": "有效", + // // "0": "无效" + // // }, + // initialValue: "1" + // }, { dataIndex: 'FIELDENUM_DESC', title: '备注说明', @@ -227,17 +227,20 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> = req = { ...currentRow, ...res, + FIELDENUM_STATUS: 1 } } else { req = { ...res, FIELDEXPLAIN_ID: FIELDEXPLAIN_ID, FIELDENUM_PID: -1, + FIELDENUM_STATUS: 1 } } console.log('reqfdshfasjjl', req); const data = await handeSynchroFIELDENUMNoEncryption(req) + console.log('datadatadata', data); handleConfirmLoading(false) if (data.Result_Code === 100) { handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}【${data.Result_Data.FIELDENUM_NAME}】`) @@ -266,6 +269,21 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> = setTableData(data) } + const markDisabled = (nodes: any, disabledIds: any) => { + return nodes.map((node: any) => { + const copy = { ...node }; + + if (disabledIds.includes(copy.FIELDENUM_ID)) { + copy.disabled = true; + } + + if (copy.children && Array.isArray(copy.children)) { + copy.children = markDisabled(copy.children, disabledIds); + } + return copy; + }); + }; + return ( = FIELDEXPLAIN_FIELD: 'BEHAVIORRECORD_TYPE', FIELDEXPLAIN_ID: "", FIELDENUM_PID: "", - FIELDENUM_STATUS: params?.FIELDENUM_STATUS, + FIELDENUM_STATUS: 1, SearchKey: "" } const data = await handeGetNestingFIELDENUMListNoEncryption(req); @@ -296,7 +314,8 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> = console.log('datadatadatadatadata', data); if (data && data.length > 0) { setTypeTreeData(data) - handleGetAllTypeData() + // handleGetAllTypeData() + setTableData(data) return { data: data, success: true, total: data.length } } return { data: [], success: true } @@ -446,35 +465,17 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> = name="FIELDENUM_PID" label="上级类别" request={async () => { + let res: any = markDisabled(tableData, currentRow?.FIELDENUM_ID ? [currentRow?.FIELDENUM_ID] : "") + console.log('resresresres', res); + let list: any = [{ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1, - children: tableData + children: res }] return list - // if (typeTreeData && typeTreeData.length > 0) { - // let list: any = [{ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }, ...typeTreeData] - // return list - // } else { - // const req = { - // FIELDEXPLAIN_FIELD: 'BEHAVIORRECORD_TYPE', - // FIELDEXPLAIN_ID: "", - // FIELDENUM_PID: "", - // FIELDENUM_STATUS: 1, - // SearchKey: "" - // } - // const data = await handeGetNestingFIELDENUMList(req); - // if (data && data.length > 0) { - // data.unshirft({ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }) - // setTypeTreeData(data) - // return data - // } else { - // return [{ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }] - // } - // } }} fieldProps={{ - // treeData: tableData, fieldNames: { label: 'FIELDENUM_NAME', value: 'FIELDENUM_ID', @@ -529,7 +530,7 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> = ]} /> - + {/* = } ]} /> - + */} 0 ? params?.MEMBERSHIP_TARGET.toString() : "" + MEMBERSHIP_TARGETS: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: params?.current, PageSize: 20, @@ -349,7 +349,7 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo OWNERUNIT_ID: 911, POINT_TYPE: params?.POINT_TYPE === '0' ? '' : params?.POINT_TYPE, POINT_SOURCE: params?.POINT_SOURCE === '0' ? '' : params?.POINT_SOURCE, - MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" + MEMBERSHIP_TARGETS: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: params?.current, PageSize: 20, diff --git a/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx b/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx index 933bbcd..11a0598 100644 --- a/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx +++ b/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx @@ -132,25 +132,25 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) ellipsis: true, hideInSearch: true, }, - { - dataIndex: 'FIELDENUM_STATUS', - title: '有效状态', - align: 'center', - width: 120, - ellipsis: true, - valueType: "select", - // valueEnum: { - // "1": "有效", - // "0": "无效" - // }, - initialValue: "1", - fieldProps: { - options: [ - { label: '有效', value: "1" }, - { label: '无效', value: "0" } - ] - } - }, + // { + // dataIndex: 'FIELDENUM_STATUS', + // title: '有效状态', + // align: 'center', + // width: 120, + // ellipsis: true, + // valueType: "select", + // // valueEnum: { + // // "1": "有效", + // // "0": "无效" + // // }, + // initialValue: "1", + // fieldProps: { + // options: [ + // { label: '有效', value: "1" }, + // { label: '无效', value: "0" } + // ] + // } + // }, { dataIndex: 'FIELDENUM_DESC', title: '备注说明', @@ -226,12 +226,14 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) req = { ...currentRow, ...res, + FIELDENUM_STATUS: 1 } } else { req = { ...res, FIELDEXPLAIN_ID: FIELDEXPLAIN_ID, FIELDENUM_PID: -1, + FIELDENUM_STATUS: 1 } } const data = await handeSynchroFIELDENUM(req) @@ -250,6 +252,22 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) } } + const markDisabled = (nodes: any, disabledIds: any) => { + return nodes.map((node: any) => { + const copy = { ...node }; + + if (disabledIds.includes(copy.FIELDENUM_ID)) { + copy.disabled = true; + } + + if (copy.children && Array.isArray(copy.children)) { + copy.children = markDisabled(copy.children, disabledIds); + } + return copy; + }); + }; + + return ( = (props) FIELDEXPLAIN_FIELD: 'POINT_TYPE', FIELDEXPLAIN_ID: "", FIELDENUM_PID: "", - FIELDENUM_STATUS: params?.FIELDENUM_STATUS, + FIELDENUM_STATUS: 1, SearchKey: "" } const data = await handeGetNestingFIELDENUMList(req); @@ -286,8 +304,8 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) const obj: any = {} const list: any = [] data.forEach((item: any) => { - list.push({ label: item.label, value: item.value }) - obj[item.value] = item.label + list.push({ label: item.FIELDENUM_NAME, value: item.FIELDENUM_VALUE }) + obj[item.FIELDENUM_VALUE] = item.FIELDENUM_NAME }) session.set('SCORETYPEList', list); session.set('SCORETYPEObj', obj); @@ -441,9 +459,15 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) name="FIELDENUM_PID" label="上级类别" request={async () => { + console.log('typeTreeDatatypeTreeData', typeTreeData); + console.log('currentRowcurrentRowcurrentRow', currentRow); if (typeTreeData && typeTreeData.length > 0) { let list: any = [{ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }, ...typeTreeData] - return list + console.log('listlist', JSON.parse(JSON.stringify(list))); + + let res = markDisabled(list, currentRow?.FIELDENUM_ID ? [currentRow.FIELDENUM_ID] : []) + console.log('resresresresres', JSON.parse(JSON.stringify(list))); + return res } else { const req = { FIELDEXPLAIN_FIELD: 'POINT_TYPE', @@ -454,9 +478,12 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) } const data = await handeGetNestingFIELDENUMList(req); if (data && data.length > 0) { - data.unshirft({ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }) + console.log('dsjkdja0', data); + + data.unshift({ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }) + let res = markDisabled(data, currentRow?.FIELDENUM_ID ? [currentRow.FIELDENUM_ID] : []) setTypeTreeData(data) - return data + return res } else { return [{ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }] } @@ -509,16 +536,16 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) - + {/* = (props) } ]} /> - + */} = (pr let SCORETYPETree = session.get('SCORETYPETree') let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList') - let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList') - let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj') + let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNListIsAllOK') + let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObjIsAllOK') // 表格数据 const [tableData, setTableData] = useState() @@ -92,12 +92,12 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr return SCORETYPETree }, render: (_, record) => { - return record?.SCORE_TYPE && SCORETYPEObj && SCORETYPEObj[record?.SCORE_TYPE] ? { + return { setCurrentRow({ ...record }); handleModalVisible(true); }}> - {SCORETYPEObj[record?.SCORE_TYPE]} - : "-" + {record?.SCORE_TYPE && SCORETYPEObj && SCORETYPEObj[record?.SCORE_TYPE] ? SCORETYPEObj[record?.SCORE_TYPE] : "-"} + } // valueEnum: SCORETYPEObj }, @@ -210,25 +210,25 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr // align: 'center', // hideInSearch: true, // }, - { - dataIndex: 'SCORESETTING_STATE', - title: '有效状态', - width: 120, - align: 'center', - valueType: 'select', - // valueEnum: { - // "1": "有效", - // "0": "无效" - // }, - fieldProps: { - options: [ - { label: '有效', value: "1" }, - { label: '无效', value: "0" } - ] - }, - initialValue: "1", - hideInTable: true - }, + // { + // dataIndex: 'SCORESETTING_STATE', + // title: '有效状态', + // width: 120, + // align: 'center', + // valueType: 'select', + // // valueEnum: { + // // "1": "有效", + // // "0": "无效" + // // }, + // fieldProps: { + // options: [ + // { label: '有效', value: "1" }, + // { label: '无效', value: "0" } + // ] + // }, + // initialValue: "1", + // hideInTable: true + // }, // { // dataIndex: 'OPERATE_DATE', // title: '操作时间', @@ -387,14 +387,16 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr ...req, ...newValue, MEMBERSHIP_TYPE: item.value, - MEMBERSHIP_LEVEL: subItem.value + MEMBERSHIP_LEVEL: subItem.value, + SCORESETTING_STATE: 1, }) reqListUpdateMsg.push(`${item.label}的${subItem.label}【${SCORETYPEObj && SCORETYPEObj[newValue.SCORE_TYPE] ? SCORETYPEObj[newValue.SCORE_TYPE] : "-"}】`) } else { req = { ...newValue, MEMBERSHIP_TYPE: item.value, - MEMBERSHIP_LEVEL: subItem.value + MEMBERSHIP_LEVEL: subItem.value, + SCORESETTING_STATE: 1, } reqList.push(req) reqListAddMsg.push(`${item.label}的${subItem.label}【${SCORETYPEObj && SCORETYPEObj[newValue.SCORE_TYPE] ? SCORETYPEObj[newValue.SCORE_TYPE] : "-"}】`) @@ -503,7 +505,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr SCORE_TYPES: params?.SCORE_TYPE || "", PROVINCE_CODE: currentUser?.ProvinceCode || "", OWNERUNIT_ID: 911, - SCORESETTING_STATE: params?.SCORESETTING_STATE, + SCORESETTING_STATE: 1, MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === '1' ? '' : params?.MEMBERSHIP_TYPE || "", MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL === '1' ? '' : params?.MEMBERSHIP_LEVEL || "", }, @@ -802,16 +804,6 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr // options={MEMBERSHIPTYPEYNList} /> - - - = (prop }, PageIndex: 1, PageSize: 999999, + SortStr: "OPERATE_DATE desc" } const data = await handeGetCOMMODITYList(req); setCurrentSearchText(params?.searchText || "") diff --git a/src/pages/travelMember/ProductSpecificationManage/index.tsx b/src/pages/travelMember/ProductSpecificationManage/index.tsx index 9b8b5a5..258ea0a 100644 --- a/src/pages/travelMember/ProductSpecificationManage/index.tsx +++ b/src/pages/travelMember/ProductSpecificationManage/index.tsx @@ -142,24 +142,24 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine width: 150, ellipsis: true, }, - { - dataIndex: 'USERDEFINEDTYPE_STATE', - title: '有效状态', - align: 'center', - width: 150, - valueType: 'select', - ellipsis: true, - fieldProps: { - options: [ - { label: '有效', value: "1" }, - { label: '无效', value: "0" } - ] - }, - initialValue: "1", - render: (_, record) => { - return record?.COMMODITY_STATE === 1 || record?.USERDEFINEDTYPE_STATE === 1 ? '有效' : '无效' - } - }, + // { + // dataIndex: 'USERDEFINEDTYPE_STATE', + // title: '有效状态', + // align: 'center', + // width: 150, + // valueType: 'select', + // ellipsis: true, + // fieldProps: { + // options: [ + // { label: '有效', value: "1" }, + // { label: '无效', value: "0" } + // ] + // }, + // initialValue: "1", + // render: (_, record) => { + // return record?.COMMODITY_STATE === 1 || record?.USERDEFINEDTYPE_STATE === 1 ? '有效' : '无效' + // } + // }, { dataIndex: 'USERDEFINEDTYPE_DESC', @@ -293,6 +293,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine STAFF_ID: currentUser?.ID, STAFF_NAME: currentUser?.Name, USERDEFINEDTYPE_ICO: fileList && fileList.length > 0 ? fileList[0].url : "", + USERDEFINEDTYPE_STATE: 1 } } else { req = { @@ -305,6 +306,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine OWNERUNIT_ID: currentUser?.OwnerUnitId, PROVINCE_CODE: currentUser?.ProvinceCode, USERDEFINEDTYPE_ICO: fileList && fileList.length > 0 ? fileList[0].url : "", + USERDEFINEDTYPE_STATE: 1 } } console.log('reqreqreqreq', req); @@ -333,7 +335,8 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine ...res, OPERATE_TIME: moment().format('YYYY-MM-DD HH:mm:ss'), STAFF_ID: currentUser?.ID, - STAFF_NAME: currentUser?.Name + STAFF_NAME: currentUser?.Name, + USERDEFINEDTYPE_STATE: 1 } } else { req = { @@ -341,7 +344,8 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), STAFF_ID: currentUser?.ID, STAFF_NAME: currentUser?.Name, - PROVINCE_CODE: currentUser?.ProvinceCode + PROVINCE_CODE: currentUser?.ProvinceCode, + USERDEFINEDTYPE_STATE: 1 } } console.log('reqreqreqreq', req); @@ -414,7 +418,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine OWNERUNIT_ID: currentUser?.OwnerUnitId, PROVINCE_CODE: "", GOODSTYPE: 6000, - USERDEFINEDTYPE_STATE: params?.USERDEFINEDTYPE_STATE, + USERDEFINEDTYPE_STATE: 1, SearchKey: params?.searchText || "", MERCHANTS_ID: currentUser?.SupplierID } @@ -425,9 +429,10 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine handleSetlogSave(`点击查询按钮`) setCurrentSearchText(params?.searchText || "") if (data && data.length > 0) { - let list: any = transformMultiRuleToChildren(data) - console.log('listlistlistlist', list); - return { data: list, success: true, total: data.length } + console.log('datadatadata', JSON.parse(JSON.stringify(data))); + // let list: any = transformMultiRuleToChildren(data) + // console.log('listlistlistlist', list); + return { data: data, success: true, total: data.length } } return { data: [], success: true } }} @@ -538,6 +543,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine footer={ { if (currentRow?.COMMODITY_MULTI_ID) { await handelDeleteSpecifications(currentRow.COMMODITY_MULTI_ID); @@ -667,13 +673,13 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine label="类别索引" /> - + {/* - + */} let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList') - let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj') - let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList') + let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObjIsAllOK') + let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNListIsAllOK') // 是否排除测试会员 const [ExcludeTest, setExcludeTest] = useState(true) diff --git a/src/pages/travelMember/SharedRestStationManagement/components/SharedRestStationDetail.tsx b/src/pages/travelMember/SharedRestStationManagement/components/SharedRestStationDetail.tsx index 865909f..1b05b7a 100644 --- a/src/pages/travelMember/SharedRestStationManagement/components/SharedRestStationDetail.tsx +++ b/src/pages/travelMember/SharedRestStationManagement/components/SharedRestStationDetail.tsx @@ -1,6 +1,6 @@ import { connect } from "umi"; import type { ConnectState } from "@/models/connect"; -import { Button, Col, FormInstance, message, Modal, Row } from "antd"; +import { Button, Col, FormInstance, message, Modal, Row, Image } from "antd"; import { useRef, useState } from "react"; import React from "react"; import Draggable from "react-draggable"; @@ -377,6 +377,7 @@ const SharedRestStationDetail = ({ parentRow, setParentRow, onShow, setOnShow, r + + {/* 图片预览组件 */} + {fileList && fileList.length > 0 &&
+ { + handleChangePreview(vis) + } + }}> + { + fileList.map((n) => ) + } + +
}
) diff --git a/src/pages/travelMember/SummaryOfIntegralGrowthValue/index.tsx b/src/pages/travelMember/SummaryOfIntegralGrowthValue/index.tsx index 6bf416a..6468380 100644 --- a/src/pages/travelMember/SummaryOfIntegralGrowthValue/index.tsx +++ b/src/pages/travelMember/SummaryOfIntegralGrowthValue/index.tsx @@ -246,7 +246,7 @@ const SummaryOfIntegralGrowthValue: React.FC<{ currentUser: CurrentUser | undefi setShowDetail(false) }} > - +
) diff --git a/src/pages/travelMember/WeChatAccountManagement/components/pushTemplate.tsx b/src/pages/travelMember/WeChatAccountManagement/components/pushTemplate.tsx index 6bc3cca..b7153a2 100644 --- a/src/pages/travelMember/WeChatAccountManagement/components/pushTemplate.tsx +++ b/src/pages/travelMember/WeChatAccountManagement/components/pushTemplate.tsx @@ -113,6 +113,7 @@ const pushTemplate = ({ parentRow, currentUser }: DetailProps) => { const req: any = { SearchParameter: { WECHATPUBLICSIGN_ID: parentRow?.WECHATPUBLICSIGN_ID, + PUSHMODULE_STATE: 1 }, PageIndex: 1, PageSize: 999999, diff --git a/src/pages/travelMember/memberInfor/component/memberDetail.tsx b/src/pages/travelMember/memberInfor/component/memberDetail.tsx index 00b0a4a..c7903eb 100644 --- a/src/pages/travelMember/memberInfor/component/memberDetail.tsx +++ b/src/pages/travelMember/memberInfor/component/memberDetail.tsx @@ -345,7 +345,7 @@ const MemberDetail = ({ showDetailDrawer, currentRow, handleCloseModal, currentU const handleSaveLabelConfig = async () => { const req: any = { ...userDetailInfo, - MEMBERSHIP_TARGET: selectUserLabel + MEMBERSHIP_TARGET: selectUserLabel || "#" } const data = await handeGetSynchroMEMBERSHIP(req) if (data.Result_Code === 100) { diff --git a/src/pages/travelMember/memberInfor/index.tsx b/src/pages/travelMember/memberInfor/index.tsx index c5e38d5..c3bc3b4 100644 --- a/src/pages/travelMember/memberInfor/index.tsx +++ b/src/pages/travelMember/memberInfor/index.tsx @@ -52,7 +52,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT const [printIndex, setPrintIndex] = useState(new Date().getTime()) - let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj'); + let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObjIsAllOK'); let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList'); let MEMBERSHIP_LEVELList = session.get('MEMBERSHIP_LEVELList'); let COMPANY_STATEObj = session.get('COMPANY_STATEObj'); @@ -774,18 +774,19 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT return value ? `${n} ${value.replace('end', '')}` : '' }) console.log('sortstrsortstrsortstrsortstr', sortstr.toString()); + console.log('isComponentisComponentisComponent', isComponent); let req: any = {} - if (isComponent) { + if (isComponent && come !== 'SummaryOfIntegralGrowthValue') { req = { SearchParameter: { // PROVINCE_CODE: currentUser?.ProvinceCode || "", OWNERUNIT_ID: 911, - MEMBERSHIP_TYPE: searchType === 1 ? valueType : '', - MEMBERSHIP_LEVEL: come === 'ActiveMemberStatistics' ? comeParams?.MEMBERSHIP_LEVEL || '' : searchType === 2 ? valueType : '', - MEMBERSHIP_STATE: 1000, + MEMBERSHIP_TYPES: searchType === 1 ? valueType : params?.MEMBERSHIP_TYPE === "1" ? "" : params?.MEMBERSHIP_TYPE, + MEMBERSHIP_LEVELS: come === 'ActiveMemberStatistics' ? comeParams?.MEMBERSHIP_LEVEL || '' : searchType === 2 ? valueType : '', + MEMBERSHIP_STATES: 1000, ACTIVE_DATE_Start: come === 'ActiveMemberStatistics' ? comeParams?.start || '' : '', ACTIVE_DATE_End: come === 'ActiveMemberStatistics' ? comeParams?.end || '' : '', - MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "", + MEMBERSHIP_TARGETS: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "", ExcludeTest: ExcludeTest || '' }, keyWord: { @@ -803,10 +804,10 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT SearchParameter: { // PROVINCE_CODE: currentUser?.ProvinceCode || "", OWNERUNIT_ID: 911, - MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === "1" ? "" : params?.MEMBERSHIP_TYPE, - MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL === "1" ? "" : params?.MEMBERSHIP_LEVEL, - MEMBERSHIP_STATE: params?.MEMBERSHIP_STATE, - MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" + MEMBERSHIP_TYPES: params?.MEMBERSHIP_TYPE === "1" ? "" : params?.MEMBERSHIP_TYPE, + MEMBERSHIP_LEVELS: params?.MEMBERSHIP_LEVEL === "1" ? "" : params?.MEMBERSHIP_LEVEL, + MEMBERSHIP_STATES: params?.MEMBERSHIP_STATE, + MEMBERSHIP_TARGETS: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" // PLATE_NUMBER: params?.MEMBERSHIP_NAME || "" }, keyWord: { @@ -837,8 +838,10 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT // sortstr: sortstr.length ? sortstr.toString() === "MEMBERGROWTH_VALUE asc" || sortstr.toString() === "MEMBERGROWTH_VALUE desc" ? "" : sortstr.toString() : "", // } setSearchParams(params) + console.log('paramsparamsparams', params); handleSetlogSave(`查看了会员账户管理列表`) + console.log('reqreq', req); const data = await handleGetMEMBERSHIPList(req) setCurrentSearchText(params?.MEMBERSHIP_NAME || "") diff --git a/src/pages/travelMember/service.ts b/src/pages/travelMember/service.ts index ad9826d..05bde0f 100644 --- a/src/pages/travelMember/service.ts +++ b/src/pages/travelMember/service.ts @@ -707,7 +707,7 @@ export async function handeSynchroFIELDENUM(params: any) { data: { ...params, requestEncryption: true } }) if (data.Result_Code !== 100) { - return [] + return data } return data } @@ -719,7 +719,7 @@ export async function handeSynchroFIELDENUMNoEncryption(params: any) { data: { ...params, requestEncryption: true } }) if (data.Result_Code !== 100) { - return [] + return data } return data } diff --git a/src/utils/format.ts b/src/utils/format.ts index 81213c4..9e14516 100644 --- a/src/utils/format.ts +++ b/src/utils/format.ts @@ -5,6 +5,7 @@ import { CurrentUser } from 'umi' import session from './session' import moment from 'moment' import { synchroBehaviorRecord } from '@/services/user' +import ExcelJS from 'exceljs'; export type TreeSelectModel = { value: number | string, @@ -875,4 +876,599 @@ export function convertTreeFieldToNumber(tree: any[], key: string): any[] { } return newNode; }); +} + + +export function markDisabled(nodes: any, disabledIds: any) { + return nodes.map((node: any) => { + const copy = { ...node }; + + if (disabledIds.includes(copy.FIELDENUM_ID)) { + copy.disabled = true; + } + + if (copy.children && Array.isArray(copy.children)) { + copy.children = markDisabled(copy.children, disabledIds); + } + return copy; + }); +}; + +/** ======== 列类型(按需裁剪) ======== */ +type AnyCol = { + title?: any; + dataIndex?: string | (string | number)[]; + children?: AnyCol[]; + valueEnum?: Record; + renderText?: (text: any, record: any, index: number) => any; + hideInTable?: boolean; + valueType?: 'index' | string; + align?: 'left' | 'center' | 'right'; +}; + +/** ========== 新增:拍平树形数据 ========== */ +function flattenTree>( + list: T[] = [], + childrenKey = 'children', + out: T[] = [] +): T[] { + for (const node of list) { + // 先推当前节点(浅拷贝去掉 children,避免把对象树写入单元格) + const { [childrenKey]: kids, ...rest } = node as any; + out.push(rest as T); + if (Array.isArray(kids) && kids.length) { + flattenTree(kids, childrenKey, out); + } + } + return out; +} + +/** 抽取 React 节点文本 */ +function extractText(node: any): string { + if (node == null || node === false) return ''; + if (typeof node === 'string' || typeof node === 'number') return String(node); + const children = node?.props?.children; + if (Array.isArray(children)) return children.map(extractText).join(''); + if (children != null) return extractText(children); + const html = node?.props?.dangerouslySetInnerHTML?.__html; + if (typeof html === 'string') return html.replace(/<[^>]+>/g, ''); + return String(node ?? ''); +} +/** 过滤 hideInTable(父级联动) */ +function pruneHiddenColumns(cols: AnyCol[]): AnyCol[] { + const walk = (arr: AnyCol[]): AnyCol[] => + (arr || []) + .filter(col => !col?.hideInTable) + .map(col => { + if (col.children?.length) { + const kids = walk(col.children); + if (!kids.length) return null as any; + return { ...col, children: kids }; + } + return col; + }) + .filter(Boolean); + return walk(cols); +} +/** 叶子列(有 dataIndex 的) */ +const getLeaves = (cols: AnyCol[]): AnyCol[] => { + const out: AnyCol[] = []; + const walk = (arr: AnyCol[]) => { + arr.forEach(c => { + if (c?.children?.length) { + walk(c.children!); + } else if (c && (c.dataIndex || c.valueType === 'index')) { // << 修改 + out.push(c); + } + }); + }; + walk(cols); + return out; +}; +const getColSpan = (c: AnyCol): number => + c.children?.length ? c.children.map(getColSpan).reduce((a, b) => a + b, 0) : 1; +/** 构造多级表头矩阵 & 合并信息(不含顶部大标题/信息行) */ +function buildHeaderMatrix(cols: AnyCol[]) { + const depth = getDepth(cols); + const rows: string[][] = Array.from({ length: depth }, () => []); + let colCursor = 0; + const merges: Array<{ r1: number; c1: number; r2: number; c2: number }> = []; + + const place = (list: AnyCol[], level: number) => { + list.forEach(col => { + const span = getColSpan(col); + const rowSpan = col.children?.length ? 1 : depth - level; + const title = extractText(col.title ?? ''); + + rows[level][colCursor] = title; + for (let i = 1; i < span; i++) rows[level][colCursor + i] = ''; + + if (span > 1 || rowSpan > 1) { + merges.push({ r1: level + 1, c1: colCursor + 1, r2: level + rowSpan, c2: colCursor + span }); + } + + if (col.children?.length) { + place(col.children, level + 1); + } else { + colCursor += 1; + } + }); + }; + + place(cols, 0); + const maxLen = Math.max(...rows.map(r => r.length)); + rows.forEach(r => { for (let i = 0; i < maxLen; i++) if (typeof r[i] === 'undefined') r[i] = ''; }); + return { headerAOA: rows, merges, depth, columnCount: maxLen }; +} +/** 深度和列跨度 */ +const getDepth = (cols: AnyCol[]): number => { + const dfs = (c: AnyCol): number => + c.children?.length ? 1 + Math.max(...c.children.map(dfs)) : 1; + return Math.max(...cols.map(dfs)); +}; +const toPath = (di?: AnyCol['dataIndex']): (string | number)[] => + Array.isArray(di) ? di : (typeof di === 'string' ? di.split('.') : []); +const getByPath = (obj: any, path: (string | number)[]) => + path.reduce((acc, k) => (acc == null ? acc : acc[k]), obj); +/** 支持 A|B 或逻辑的取值 */ +const getValueWithOr = (obj: any, dataIndex?: AnyCol['dataIndex']): any => { + if (!dataIndex) return undefined; + + // 如果是数组,直接使用原逻辑 + if (Array.isArray(dataIndex)) { + return getByPath(obj, dataIndex); + } + + // 如果是字符串,检查是否包含 | 符号 + if (typeof dataIndex === 'string') { + if (dataIndex.includes('|')) { + // 分割并按优先级取值 + const keys = dataIndex.split('|').map(key => key.trim()); + for (const key of keys) { + const value = getByPath(obj, toPath(key)); + if (value != null && value !== '') { + return value; + } + } + return null; + } else { + // 普通路径,使用原逻辑 + return getByPath(obj, toPath(dataIndex)); + } + } + + return undefined; +}; + +/** 单元格显示值(valueEnum / renderText / 原始值) */ +function getCellValue(col: AnyCol, record: any, rowIndex: number) { + // << 新增:序号列 + if (col.valueType === 'index') return rowIndex + 1; + + const raw = getValueWithOr(record, col.dataIndex); + if (col.valueEnum) { + const ve = col.valueEnum[raw as any]; + if (typeof ve === 'string') return ve; + if (ve?.text != null) return ve.text; + } + if (col.renderText) { + try { return col.renderText(raw, record, rowIndex); } catch { } + } + return raw; +} +/** 估算列宽(简单) */ +const estimateWidth = (v: any) => { + const s = (v ?? '').toString(); + const len = Array.from(s).reduce((n, ch) => n + (/[^\x00-\xff]/.test(ch) ? 2 : 1), 0); + return Math.min(Math.max(len + 2, 8), 60); +}; + + +export async function exportXlsxFromProColumnsExcelJS( + rawColumns: AnyCol[], + dataSource: any[], + filename?: string, + options?: { + sheetName?: string; + chunkSize?: number; + topTitle?: string; + infoRowLeft?: string; + infoRowRight?: string; + freezeHeader?: boolean; // 已保留但默认不再生效(不触发冻结) + childrenKey?: string; + + // 底部信息 + footerMaker?: any; + footerMakerTime?: any; + footerStatsTime?: any; + } +) { + const { + sheetName = '数据', + chunkSize = 100_000, + topTitle, + infoRowLeft, + infoRowRight, + // 为兼容外部调用保留字段,但默认不做冻结以满足你的要求 + freezeHeader = false, + childrenKey = 'children', + footerMaker, + footerMakerTime, + footerStatsTime, + } = options || {}; + + const flatData = flattenTree(Array.isArray(dataSource) ? dataSource : [], childrenKey); + + const columns = pruneHiddenColumns(rawColumns); + const leafCols = getLeaves(columns); + if (!leafCols.length) throw new Error('无可导出的列(可能被 hideInTable 全部隐藏)'); + + const { headerAOA, merges, columnCount } = buildHeaderMatrix(columns); + + const wb = new ExcelJS.Workbook(); + wb.created = new Date(); + wb.modified = new Date(); + + const total = flatData?.length ?? 0; + const totalSheets = Math.max(1, Math.ceil(total / chunkSize)); + + for (let si = 0; si < totalSheets; si++) { + // 注意:不再传 views 配置,避免任何默认冻结 + const ws = wb.addWorksheet(totalSheets === 1 ? sheetName : `${sheetName}_${si + 1}`); + + let currentRowIndex = 1; + + // 顶部标题 + if (topTitle) { + const row = ws.getRow(currentRowIndex); + row.getCell(1).value = topTitle; + ws.mergeCells(currentRowIndex, 1, currentRowIndex, columnCount); + const cell = ws.getCell(currentRowIndex, 1); + cell.alignment = { horizontal: 'center', vertical: 'middle' }; + cell.font = { bold: true, size: 14 }; + row.height = 22; + currentRowIndex += 1; + } + + // 信息行 + if (infoRowLeft != null || infoRowRight != null) { + const row = ws.getRow(currentRowIndex); + const split = Math.max(1, Math.floor(columnCount / 2)); + if (infoRowLeft != null) { + row.getCell(1).value = infoRowLeft; + ws.mergeCells(currentRowIndex, 1, currentRowIndex, split); + const leftCell = ws.getCell(currentRowIndex, 1); + leftCell.alignment = { horizontal: 'left', vertical: 'middle' }; + leftCell.font = { size: 11 }; + } + if (infoRowRight != null) { + row.getCell(split + 1).value = infoRowRight; + ws.mergeCells(currentRowIndex, split + 1, currentRowIndex, columnCount); + const rightCell = ws.getCell(currentRowIndex, split + 1); + rightCell.alignment = { horizontal: 'right', vertical: 'middle' }; + rightCell.font = { size: 11 }; + } + row.height = 18; + currentRowIndex += 1; + } + + // 表头(保持原有样式与合并) + const headerStartRow = currentRowIndex; + headerAOA.forEach((r, idx) => { + const row = ws.getRow(headerStartRow + idx); + r.forEach((v, cIdx) => { + const cell = row.getCell(cIdx + 1); + cell.value = v; + cell.alignment = { horizontal: 'center', vertical: 'middle' }; + cell.font = { bold: true }; + }); + row.height = 18; + }); + merges.forEach(m => { + ws.mergeCells(headerStartRow + (m.r1 - 1), m.c1, headerStartRow + (m.r2 - 1), m.c2); + }); + currentRowIndex += headerAOA.length; + + // 数据区 + const start = si * chunkSize; + const end = Math.min(start + chunkSize, total); + const batch = flatData.slice(start, end); + + for (let i = 0; i < batch.length; i++) { + const rec = batch[i]; + const row = ws.getRow(currentRowIndex + i); + leafCols.forEach((col, j) => { + const cell = row.getCell(j + 1); + const v = getCellValue(col, rec, start + i); + cell.value = v; + if (col.align) cell.alignment = { horizontal: col.align, vertical: 'middle' }; + }); + } + currentRowIndex += batch.length; + + // 列宽估算 + const sampleRows = Math.min(batch.length, 200); + for (let c = 1; c <= columnCount; c++) { + const headerMax = Math.max(...headerAOA.map(r => estimateWidth(r[c - 1]))); + let dataMax = 8; + for (let i = 0; i < sampleRows; i++) { + const v = leafCols[c - 1] ? getCellValue(leafCols[c - 1], batch[i], start + i) : ''; + dataMax = Math.max(dataMax, estimateWidth(v)); + } + ws.getColumn(c).width = Math.max(headerMax, dataMax); + } + + // 注意:不再对 ws.views 进行任何设置(避免冻结表头) + // if (freezeHeader) { ... } // 已移除 + + // 底部三项(同一行 + 平均分列 + 直接显示“标题:值”) + if (footerMaker != null || footerMakerTime != null || footerStatsTime != null) { + currentRowIndex += 1; + const footerRow = ws.getRow(currentRowIndex); + + const items = [ + `制单人员:${footerMaker ?? ''}`, + `制单时间:${footerMakerTime ?? ''}`, + `统计时间:${footerStatsTime ?? ''}`, + ]; + + const groups = 3; + const base = Math.floor(columnCount / groups); + let remainder = columnCount - base * groups; + const sizes: number[] = []; + for (let g = 0; g < groups; g++) { + sizes.push(base + (remainder > 0 ? 1 : 0)); + if (remainder > 0) remainder -= 1; + } + if (columnCount < groups) { + for (let g = 0; g < groups; g++) sizes[g] = 0; + for (let k = 0; k < columnCount; k++) sizes[k] = 1; + } + + let colCursor = 1; + for (let g = 0; g < groups; g++) { + const segSize = sizes[g]; + if (segSize <= 0) continue; + const startCol = colCursor; + const endCol = colCursor + segSize - 1; + + if (endCol > startCol) ws.mergeCells(currentRowIndex, startCol, currentRowIndex, endCol); + + const cell = footerRow.getCell(startCol); + cell.value = items[g]; + cell.alignment = { horizontal: 'left', vertical: 'middle' }; + cell.font = { size: 11 }; + + colCursor += segSize; + } + + footerRow.height = 18; + currentRowIndex += 1; + } + } + + // 生成并触发下载 + const buf = await wb.xlsx.writeBuffer(); + const blob = new Blob([buf], { + type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + }); + const url = URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${filename || sheetName}.xlsx`; + a.click(); + setTimeout(() => URL.revokeObjectURL(url), 1000); +} + + + +/** + * 格式化多层级树形数据 - 千分号格式化和枚举解析 + * @param data 多层级数组数据 + * @param formatFields 需要格式化的字段数组 (支持嵌套字段如 "obj.fieldName") + * @param enumFields 需要解析枚举的字段数组 (支持嵌套字段) + * @param enumData 枚举对应的数据数组,按顺序对应 enumFields + * @param childrenKey 子节点的key名称,默认为 'children' + * @returns 格式化后的数组数据 + */ +export function formatTreeData( + data: any[], + formatFields: string[] = [], + enumFields: string[] = [], + enumData: any[] = [], + percentFields: string[] = [], + childrenKey: string = 'children' +): any[] { + if (!data || !Array.isArray(data) || data.length === 0) { + return data; + } + + /** + * 根据字段路径获取对象的值 + * @param obj 目标对象 + * @param path 字段路径,如 "obj.fieldName" + * @returns 字段值 + */ + function getNestedValue(obj: any, path: string): any { + if (!obj || typeof obj !== 'object') { + return undefined; + } + + const keys = path.split('.'); + let current = obj; + + for (const key of keys) { + if (current === null || current === undefined) { + return undefined; + } + current = current[key]; + } + + return current; + } + + /** + * 根据字段路径设置对象的值 + * @param obj 目标对象 + * @param path 字段路径,如 "obj.fieldName" + * @param value 要设置的值 + */ + function setNestedValue(obj: any, path: string, value: any): void { + if (!obj || typeof obj !== 'object') { + return; + } + + const keys = path.split('.'); + let current = obj; + + for (let i = 0; i < keys.length - 1; i++) { + const key = keys[i]; + if (current[key] === null || current[key] === undefined || typeof current[key] !== 'object') { + current[key] = {}; + } + current = current[key]; + } + + current[keys[keys.length - 1]] = value; + } + + /** + * 将数字格式化为千分号字符串 + * @param value 要格式化的值 + * @returns 格式化后的字符串 + */ + function formatNumber(value: any): string { + if (value === null || value === undefined || value === '') { + return ''; + } + + const num = Number(value); + if (isNaN(num)) { + return String(value); + } + + return num.toLocaleString(); + } + + /** + * 根据枚举数据解析值 + * @param value 要解析的值 + * @param enumData 枚举数据,支持对象格式 {1000:"枚举1",2000:"枚举2"} 或数组格式 + * @returns 解析后的值 + */ + function parseEnumValue(value: any, enumData: any): any { + if (!enumData) { + return value; + } + + // 支持对象格式 {1000:"枚举1",2000:"枚举2"} + if (typeof enumData === 'object' && !Array.isArray(enumData)) { + // 直接匹配 + let enumValue = enumData[value]; + if (enumValue !== undefined) { + return enumValue; + } + + // 类型转换匹配:尝试字符串和数字的相互转换 + const valueStr = String(value); + const valueNum = Number(value); + + // 如果原值是数字,尝试用字符串匹配 + if (!isNaN(valueNum)) { + enumValue = enumData[valueStr]; + if (enumValue !== undefined) { + return enumValue; + } + } + + // 如果原值是字符串,尝试用数字匹配 + if (!isNaN(valueNum)) { + enumValue = enumData[valueNum]; + if (enumValue !== undefined) { + return enumValue; + } + } + + // 遍历所有键进行宽松匹配 + for (const key in enumData) { + if (String(key) === String(value) || Number(key) === Number(value)) { + return enumData[key]; + } + } + + return value; + } + + // 支持数组格式(保持向下兼容) + if (Array.isArray(enumData) && enumData.length > 0) { + const enumItem = enumData.find(item => { + // 支持多种匹配方式,包括类型转换 + const itemValue = item.value || item.id || item.key || item.code; + return itemValue === value || + String(itemValue) === String(value) || + Number(itemValue) === Number(value); + }); + + if (enumItem) { + // 返回枚举项的显示文本 + return enumItem.label || enumItem.name || enumItem.text || enumItem.title || value; + } + } + + return value; + } + + function formatRecursive(nodes: any[]): any[] { + return nodes.map(node => { + // 深拷贝节点,避免修改原数据 + const newNode = JSON.parse(JSON.stringify(node)); + + // 处理格式化字段 + formatFields.forEach(fieldPath => { + const value = getNestedValue(newNode, fieldPath); + if (value !== undefined) { + const formattedValue = formatNumber(value); + setNestedValue(newNode, fieldPath, formattedValue); + } + }); + + // 处理枚举字段 + enumFields.forEach((fieldPath, index) => { + const value = getNestedValue(newNode, fieldPath); + if (value !== undefined && enumData[index]) { + const parsedValue = parseEnumValue(value, enumData[index]); + setNestedValue(newNode, fieldPath, parsedValue); + } + }); + + // 处理百分号字段 + percentFields.forEach((fieldPath) => { + const value = getNestedValue(newNode, fieldPath); + if (value !== undefined) { + // 如果值是null,设置为空字符串 + if (value === null) { + setNestedValue(newNode, fieldPath, ''); + return; + } + + const currentValueStr = String(value); + + // 如果值后面还没有百分号,则添加 + if (!currentValueStr.endsWith('%')) { + const percentValue = currentValueStr + '%'; + setNestedValue(newNode, fieldPath, percentValue); + } + } + }); + + // 递归处理子节点 + if (newNode[childrenKey] && Array.isArray(newNode[childrenKey]) && newNode[childrenKey].length > 0) { + newNode[childrenKey] = formatRecursive(newNode[childrenKey]); + } + + return newNode; + }); + } + + return formatRecursive(data); } \ No newline at end of file diff --git a/src/utils/requestCloud.ts b/src/utils/requestCloud.ts new file mode 100644 index 0000000..0c922b3 --- /dev/null +++ b/src/utils/requestCloud.ts @@ -0,0 +1,220 @@ +/** Request 网络请求工具 更详细的 api 文档: https://github.com/umijs/umi-request */ +import { extend } from 'umi-request'; + +import { notification } from 'antd'; + +import Cookies from 'js-cookie'; +import moment from 'moment'; +import session from './session'; +import type { CurrentUser } from '@/models/user'; +import { SynchroBEHAVIORRECORD } from '@/services/user'; +import { encryptAES } from './handleAes'; + +const codeMessage: Record = { + 200: '服务器成功返回请求的数据。', + 201: '新建或修改数据成功。', + 202: '一个请求已经进入后台排队(异步任务)。', + 204: '删除数据成功。', + 400: '发出的请求有错误,服务器没有进行新建或修改数据的操作。', + 401: '用户没有权限(令牌、用户名、密码错误)。', + 403: '用户得到授权,但是访问是被禁止的。', + 404: '发出的请求针对的是不存在的记录,服务器没有进行操作。', + 406: '请求的格式不可得。', + 410: '请求的资源被永久删除,且不会再得到的。', + 422: '当创建一个对象时,发生一个验证错误。', + 500: '服务器发生错误,请检查服务器。', + 502: '网关错误。', + 503: '服务不可用,服务器暂时过载或维护。', + 504: '网关超时。', +}; + +/** + * @zh-CN 异常处理程序 + * @en-US Exception handler + */ +const errorHandler = (error: { response: Response }): Response => { + const { response } = error; + + + if (response && response.status) { + const errorText = codeMessage[response.status] || response.statusText; + const { status, url } = response; + + notification.error({ + message: `请求错误 ${status}: ${url}`, + description: errorText, + }); + } else if (!response) { + notification.error({ + description: '您的网络异常,无法连接到服务器.', + message: '网络异常', + }); + } + return response; +}; +/** + * @en-US Configure the default parameters for request + * @zh-CN 配置request请求时的默认参数 + */ +const request = extend({ + errorHandler, // default error handling + // prefix: '/EShangApiMain',// 开发 + prefix: 'https://eshangtech.com:18900/EShangApiMain', // 正式 + headers: { + token: '', + ProvinceCode: '', + ServerpartCodes: '', + // tmp: (new Date()).getTime() + } + + // credentials: 'include', // Does the default request bring cookies + +}); + +// 存一下进来调用的值 +// let userbeHaviObj: any = {} + + +// request拦截器, 改变url 或 options. +request.interceptors.request.use((url, opt: any) => { + const options = { ...opt } + const currentUser: CurrentUser = session.get('currentUser'); + // let userbeHaviObj = { + // url: url, + // options: options, + // currentUser: currentUser, + // startTime: new Date().getTime() + // } + // options.userbeHaviObj = userbeHaviObj + + if (currentUser) { + if (options.headers) { + if (url.indexOf('SynchroSERVERPART') > -1) { + options.headers = { + ...options.headers, + PROVINCE_CODE: opt?.data?.PROVINCE_CODE, + ProvinceCode: opt?.data?.PROVINCE_CODE, + provincecode: opt?.data?.PROVINCE_CODE, + token: currentUser.UserToken || '', + ServerpartCodes: currentUser.CityAuthority || '', + ServerpartShopIds: currentUser.ServerpartShopIds || '', + UserPattern: currentUser?.UserPattern || '', + + } + } else { + options.headers = { + ...options.headers, + token: currentUser.UserToken || '', + ProvinceCode: opt?.data?.noProvinceCode ? '' : (currentUser.ProvinceCode || ''), + ServerpartCodes: currentUser.CityAuthority || '', + ServerpartShopIds: currentUser.ServerpartShopIds || '', + UserPattern: currentUser?.UserPattern || '', + } + } + } + + + if (url.indexOf('SynchroSERVERPART') > -1) { + options.data = { + ...options.data, + STAFF_ID: currentUser.ID, + STAFF_NAME: currentUser.Name, + OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + PROVINCE_CODE: opt?.data?.PROVINCE_CODE, + } + } else { + if ((url.indexOf('Synchro') > -1 || url.indexOf('Save') > -1) && + url.indexOf('Picture/SaveImgFile') === -1) { + + // 添加操作人和业主单位信息 + options.data = { + ...options.data, + STAFF_ID: currentUser.ID, + STAFF_NAME: currentUser.Name, + OWNERUNIT_ID: options.data.OWNERUNIT_ID || currentUser.OwnerUnitId, + OWNERUNIT_NAME: options.data.OWNERUNIT_NAME || currentUser.ProvinceUnit, + PROVINCE_CODE: (options.data.PROVINCE_CODE || currentUser.ProvinceCode), + + OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss') + } + if (currentUser?.UserPattern === 2000) { + options.data = { + ...options.data, + PROVINCE_CODE: (options.data.PROVINCE_CODE || currentUser.ProvinceCode), + BUSINESSMAN_ID: currentUser.BusinessManID, + OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss') + } + } + } + } + + if (options && options.data && options.data.requestEncryption) { + options.data = { + name: "", + value: encryptAES(JSON.stringify(options.data)) + } + } + } + return { + // url: url.indexOf('handler_ajax.ashx')>-1 ?`https://user.eshangtech.com${url}`: `http://47.96.233.105/EShangApiMain${url}`, + url,// .indexOf('handler_ajax.ashx')>-1 ?`${url}`: `/EShangApiMain${url}`, + options, + } +}) +request.interceptors.response.use((response, option) => { + const nowTmp = moment() + Cookies.set('tmp', nowTmp.format()) + + // // 加个数组 如果请求地址是数组里面的 那就不调用 记录用户行为了 + // let specialList = ['/FrameWork/GetFieldEnumByField', "/FrameWork/GetUserModuleList", "/FrameWork/GetFieldEnumTree", '/Logging/GetPassportInfoByToken', '/Logging/UserLogin', 'Dictionary/GetFieEnumList', '/Platform/SynchroBehaviorrecord'] + // // 判断一下 现在的这次请求 是不是特殊 不需要进行记录的 + // let isOk: boolean = true + + // let userbeHaviObj = option?.userbeHaviObj || {} + + // specialList.forEach((item: any) => { + // if (userbeHaviObj.url.indexOf(item) !== -1) { + // isOk = false + // } + // }) + + // if (isOk) { + // let nowMenu = session.get("currentMenu") + // let endTime = new Date().getTime() + // let basicInfo = session.get("basicInfo") + // let systemBasin = session.get("systemBasin") + // let browserVersion = session.get("browserVersion") + + // const req: any = { + // USER_ID: userbeHaviObj.currentUser.ID, + // USER_NAME: userbeHaviObj.currentUser.Name, + // BEHAVIORRECORD_TYPE: "2000", // 1000 浏览页面 2000 行为记录 + // BEHAVIORRECORD_EXPLAIN: `在页面${nowMenu.name}调用接口${userbeHaviObj.url.split('https://pos.eshangtech.com')[1]}`, + // BEHAVIORRECORD_TIME: moment(new Date(userbeHaviObj.startTime)).format('YYYY-MM-DD HH:mm:ss'), + // BEHAVIORRECORD_ROUT: nowMenu.pathname, + // BEHAVIORRECORD_ROUTNAME: nowMenu.name, + // BEHAVIORRECORD_LEAVETIME: moment(new Date(endTime)).format('YYYY-MM-DD HH:mm:ss'), + // BEHAVIORRECORD_DURATION: (endTime - userbeHaviObj.startTime) / 1000, + // OWNERUNIT_ID: userbeHaviObj.currentUser.OwnerUnitId, + // OWNERUNIT_NAME: userbeHaviObj.currentUser.OwnerUnitName, + // BUSINESSMAN_ID: userbeHaviObj.currentUser.BusinessManID, + // BUSINESSMAN_NAME: userbeHaviObj.currentUser.BusinessManName, + // SOURCE_PLATFORM: '驿商云平台', + // BEHAVIORRECORD_DESC: JSON.stringify(userbeHaviObj.options.params) === '{}' ? userbeHaviObj.url.split('?')[1] : JSON.stringify(userbeHaviObj.options.params), // 入参 + // USER_LOGINIP: basicInfo.ip, + // USER_LOGINPLACE: `${basicInfo.country}${basicInfo.prov}${basicInfo.city}${basicInfo.district}`, + // BROWSER_VERSION: browserVersion, + // OPERATING_SYSTEM: systemBasin + // } + // console.log('reqreqreqreqreq', req); + // // fetch('https://pos.eshangtech.com/EShangApiMain/Platform/SynchroBEHAVIORRECORD', { + // // method: 'POST', + // // headers: { + // // 'Content-Type': 'application/json', + // // }, + // // body: JSON.stringify(req), + // // }) + // } + return response +}) +export default request; diff --git a/src/versionEnv.ts b/src/versionEnv.ts index 2232079..17dbdc3 100644 --- a/src/versionEnv.ts +++ b/src/versionEnv.ts @@ -1,4 +1,4 @@ // 由 scripts/writeVersion.js 自动生成 -export const VERSION = "4.5.80"; -export const GIT_HASH = "8188ef3"; -export const BUILD_TIME = "2025-12-01T10:30:33.613Z"; +export const VERSION = "4.5.83"; +export const GIT_HASH = "a5e49cf"; +export const BUILD_TIME = "2025-12-08T12:14:56.214Z";