update
This commit is contained in:
parent
a5e49cfab8
commit
f1ba03ab73
@ -484,9 +484,9 @@ export default [
|
|||||||
icon: 'AccountBookOutlined',
|
icon: 'AccountBookOutlined',
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
path: 'CardCouponApplicRules',
|
path: 'CardCouponApplicRule',
|
||||||
name: 'CardCouponApplicRules',
|
name: 'CardCouponApplicRule',
|
||||||
component: './CardInformation/CardCouponApplicRules/index'
|
component: './CardInformation/CardCouponApplicRule/index'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'CardInformationManager',
|
path: 'CardInformationManager',
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ant-design-pro",
|
"name": "ant-design-pro",
|
||||||
"version": "4.5.80",
|
"version": "4.5.83",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "An out-of-box UI solution for enterprise applications",
|
"description": "An out-of-box UI solution for enterprise applications",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -225,7 +225,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
|
|||||||
const handleGetAllFieldEnum = async () => {
|
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) {
|
if (MEMBERSHIPTYPEYN && MEMBERSHIPTYPEYN.length > 0) {
|
||||||
const obj: any = {}
|
const obj: any = {}
|
||||||
const list: any = []
|
const list: any = []
|
||||||
@ -239,6 +239,21 @@ const BasicLayout: React.FC<BasicLayoutProps> = (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({
|
handeGetNestingFIELDENUMList({
|
||||||
FIELDEXPLAIN_FIELD: 'MEMBERSHIP_LEVEL_YN',
|
FIELDEXPLAIN_FIELD: 'MEMBERSHIP_LEVEL_YN',
|
||||||
|
|||||||
@ -32,7 +32,7 @@ const SelectServiceShop = ({ currentUser, showDetail, onCancel, onOk, currentRow
|
|||||||
dataIndex: 'searchText',
|
dataIndex: 'searchText',
|
||||||
hideInTable: true,
|
hideInTable: true,
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
placeholder: '请输入用户昵称/手机号码/订单编号'
|
placeholder: '请输入服务区名称/门店名称'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -10,6 +10,7 @@ import { handeGetCouponExchangeSummary } from "@/pages/travelMember/service";
|
|||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import { highlightText } from "@/utils/highlightText";
|
import { highlightText } from "@/utils/highlightText";
|
||||||
import CardInfo from "../CardInformationManager/components/CardInfo";
|
import CardInfo from "../CardInformationManager/components/CardInfo";
|
||||||
|
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
||||||
|
|
||||||
const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
||||||
const { currentUser } = props
|
const { currentUser } = props
|
||||||
@ -137,7 +138,8 @@ const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
<div>
|
<div>
|
||||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||||
|
|
||||||
<SelectCardVouch setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
|
{/* <SelectCardVouch setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} /> */}
|
||||||
|
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
|
||||||
<div style={{
|
<div style={{
|
||||||
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||||
paddingTop: 0,
|
paddingTop: 0,
|
||||||
@ -165,10 +167,12 @@ const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
|
|
||||||
let req: any = {
|
let req: any = {
|
||||||
OwnerUnitId: currentUser?.OwnerUnitId,
|
OwnerUnitId: currentUser?.OwnerUnitId,
|
||||||
ServerpartId: "",
|
ServerpartId: selectedId || "",
|
||||||
StartDate: params?.STARTDATE || "",
|
StartDate: params?.STARTDATE || "",
|
||||||
EndDate: params?.ENDDATE || "",
|
EndDate: params?.ENDDATE || "",
|
||||||
CouponType: params?.CouponType || ""
|
CouponType: params?.CouponType || "",
|
||||||
|
SearchKeyName: "COUPON_NAME",
|
||||||
|
SearchKeyValue: params?.searchValue || ""
|
||||||
}
|
}
|
||||||
|
|
||||||
let data: any = await handeGetCouponExchangeSummary(req)
|
let data: any = await handeGetCouponExchangeSummary(req)
|
||||||
|
|||||||
@ -161,7 +161,7 @@ const selectCardVouch = ({ setSelectedId, reload, actionRef, currentUser, width,
|
|||||||
<ProFormText
|
<ProFormText
|
||||||
name={'searchValue'}
|
name={'searchValue'}
|
||||||
fieldProps={{
|
fieldProps={{
|
||||||
placeholder: '请输入服务区名称'
|
placeholder: '请输入卡券名称'
|
||||||
}}
|
}}
|
||||||
allowClear
|
allowClear
|
||||||
/>
|
/>
|
||||||
@ -181,7 +181,7 @@ const selectCardVouch = ({ setSelectedId, reload, actionRef, currentUser, width,
|
|||||||
</div>
|
</div>
|
||||||
</div>}
|
</div>}
|
||||||
colSpan={!collapsible ? "300px" : "60px"}
|
colSpan={!collapsible ? "300px" : "60px"}
|
||||||
title={!collapsible ? "请选择服务区" : ""}
|
title={!collapsible ? "请选择卡券" : ""}
|
||||||
headerBordered
|
headerBordered
|
||||||
collapsed={collapsible}
|
collapsed={collapsible}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -270,7 +270,7 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool
|
|||||||
// 核销时间
|
// 核销时间
|
||||||
USED_DATE_Start: params?.searchType === '2' ? params?.STARTDATE : '',
|
USED_DATE_Start: params?.searchType === '2' ? params?.STARTDATE : '',
|
||||||
USED_DATE_End: params?.searchType === '2' ? params?.ENDDATE : '',
|
USED_DATE_End: params?.searchType === '2' ? params?.ENDDATE : '',
|
||||||
COUPON_STATE: params?.COUPON_STATE || ""
|
COUPON_STATE: params?.COUPON_STATES || ""
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
|
|||||||
@ -126,7 +126,7 @@ export async function handleGetServerpartShopList(params: any) {
|
|||||||
|
|
||||||
const data = await request(`/BaseInfo/GetServerpartShopList`, {
|
const data = await request(`/BaseInfo/GetServerpartShopList`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: params
|
data: { ...params, requestEncryption: true }
|
||||||
})
|
})
|
||||||
|
|
||||||
if (data.Result_Code === 500) {
|
if (data.Result_Code === 500) {
|
||||||
|
|||||||
@ -132,17 +132,17 @@ const DataDictionary: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
2: { text: '隐藏', status: 'warning' },
|
2: { text: '隐藏', status: 'warning' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '菜单状态',
|
// title: '菜单状态',
|
||||||
dataIndex: 'MenuStatus',
|
// dataIndex: 'MenuStatus',
|
||||||
// hideInSearch: true,
|
// // hideInSearch: true,
|
||||||
hideInTable: true,
|
// hideInTable: true,
|
||||||
valueEnum: {
|
// valueEnum: {
|
||||||
0: { text: '无效', status: 'Default' },
|
// 0: { text: '无效', status: 'Default' },
|
||||||
1: { text: '有效', status: 'Processing' },
|
// 1: { text: '有效', status: 'Processing' },
|
||||||
2: { text: '隐藏', status: 'warning' },
|
// 2: { text: '隐藏', status: 'warning' },
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '说明',
|
title: '说明',
|
||||||
dataIndex: 'SYSTEMMENU_DESC',
|
dataIndex: 'SYSTEMMENU_DESC',
|
||||||
@ -325,7 +325,8 @@ const DataDictionary: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const data: any = await getSystemMenu({
|
const data: any = await getSystemMenu({
|
||||||
...params,
|
...params,
|
||||||
ShowModule: true,
|
ShowModule: true,
|
||||||
SystemMenuPID: currentUser?.ID === 4653 ? '95' : '-1'
|
SystemMenuPID: currentUser?.ID === 4653 ? '95' : '-1',
|
||||||
|
MenuStatus: "1,2"
|
||||||
})
|
})
|
||||||
setMenuTree(data)
|
setMenuTree(data)
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,8 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const [tableLoading, setTableLoading] = useState<boolean>(false)
|
const [tableLoading, setTableLoading] = useState<boolean>(false)
|
||||||
// 判断是否是第一次
|
// 判断是否是第一次
|
||||||
const [isFirst, setIsFirst] = useState<boolean>(true)
|
const [isFirst, setIsFirst] = useState<boolean>(true)
|
||||||
|
// 导出excel的加载
|
||||||
|
const [exportExcelLoading, setExportExcelLoading] = useState<boolean>(false)
|
||||||
|
|
||||||
|
|
||||||
const [columnsStateMap, setColumnsStateMap] = useState<any>({
|
const [columnsStateMap, setColumnsStateMap] = useState<any>({
|
||||||
@ -179,16 +181,16 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: 'SOURCE_PLATFORM',
|
dataIndex: 'SOURCE_PLATFORM',
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
"驿商云平台": "驿商云平台",
|
// "驿商云平台": "驿商云平台",
|
||||||
"数智化看板": "数智化看板",
|
// "数智化看板": "数智化看板",
|
||||||
"驿行畅旅": "驿行畅旅",
|
// "驿行畅旅": "驿行畅旅",
|
||||||
"驿付商家版": "驿付商家版",
|
// "驿付商家版": "驿付商家版",
|
||||||
"微信公众号": "微信公众号",
|
// "微信公众号": "微信公众号",
|
||||||
"驿商云客户端": "驿商云客户端",
|
// "驿商云客户端": "驿商云客户端",
|
||||||
"彩云驿出行": "彩云驿出行",
|
"彩云驿出行": "彩云驿出行",
|
||||||
"出行平台": "出行平台",
|
"出行平台": "出行平台",
|
||||||
},
|
},
|
||||||
initialValue: currentUser?.ProvinceCode === "530000" ? '出行平台' : '驿商云平台'
|
initialValue: currentUser?.ProvinceCode === "530000" ? '出行平台' : ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作系统',
|
title: '操作系统',
|
||||||
@ -253,17 +255,17 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
let params: any = {
|
let params: any = {
|
||||||
BEHAVIORRECORD_TIME: moment(res.BEHAVIORRECORD_TIME._d).format('YYYY-MM-DD'),
|
BEHAVIORRECORD_TIME: moment(res.BEHAVIORRECORD_TIME._d).format('YYYY-MM-DD'),
|
||||||
SOURCE_PLATFORM: res.SOURCE_PLATFORM,
|
SOURCE_PLATFORM: res.SOURCE_PLATFORM,
|
||||||
BEHAVIORRECORD_TYPE: res.BEHAVIORRECORD_TYPE,
|
BEHAVIORRECORD_TYPES: res.BEHAVIORRECORD_TYPE,
|
||||||
...res
|
...res
|
||||||
}
|
}
|
||||||
|
setExportExcelLoading(true)
|
||||||
setTableLoading(true)
|
setTableLoading(true)
|
||||||
const req: any = {
|
const req: any = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
BEHAVIORRECORD_TIME_Start: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
|
BEHAVIORRECORD_TIME_Start: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
|
||||||
BEHAVIORRECORD_TIME_End: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
|
BEHAVIORRECORD_TIME_End: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
|
||||||
SOURCE_PLATFORMS: params?.SOURCE_PLATFORM,
|
SOURCE_PLATFORMS: params?.SOURCE_PLATFORM,
|
||||||
// BEHAVIORRECORD_TYPE: params?.BEHAVIORRECORD_TYPE
|
BEHAVIORRECORD_TYPES: params?.BEHAVIORRECORD_TYPE,
|
||||||
},
|
},
|
||||||
SortStr: 'BEHAVIORRECORD_TIME desc',
|
SortStr: 'BEHAVIORRECORD_TIME desc',
|
||||||
KeyWord: {
|
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_Start: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
|
||||||
BEHAVIORRECORD_TIME_End: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
|
BEHAVIORRECORD_TIME_End: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
|
||||||
SOURCE_PLATFORMS: params?.SOURCE_PLATFORM,
|
SOURCE_PLATFORMS: params?.SOURCE_PLATFORM,
|
||||||
// BEHAVIORRECORD_TYPE: params?.BEHAVIORRECORD_TYPE
|
BEHAVIORRECORD_TYPES: params?.BEHAVIORRECORD_TYPE,
|
||||||
},
|
},
|
||||||
SortStr: 'BEHAVIORRECORD_TIME desc',
|
SortStr: 'BEHAVIORRECORD_TIME desc',
|
||||||
KeyWord: {
|
KeyWord: {
|
||||||
@ -299,6 +301,8 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
}
|
}
|
||||||
const allData = await handleGetBEHAVIORRECORDList(allReq)
|
const allData = await handleGetBEHAVIORRECORDList(allReq)
|
||||||
setTableData(allData.List)
|
setTableData(allData.List)
|
||||||
|
setReqDetailList(allData.List)
|
||||||
|
setExportExcelLoading(false)
|
||||||
setIsFirst(false)
|
setIsFirst(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -404,6 +408,7 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
<Button
|
<Button
|
||||||
key="new"
|
key="new"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
loading={exportExcelLoading}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
if (reqDetailList && reqDetailList.length > 0) {
|
if (reqDetailList && reqDetailList.length > 0) {
|
||||||
setShowLoading(true)
|
setShowLoading(true)
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import requestEncryption from "@/utils/requestEncryption"
|
import requestEncryption from "@/utils/requestEncryption"
|
||||||
|
import requestCloud from "@/utils/requestCloud"
|
||||||
|
|
||||||
// 获取用户行为记录表列表
|
// 获取用户行为记录表列表
|
||||||
export async function handleGetBEHAVIORRECORDList(params?: any) {
|
export async function handleGetBEHAVIORRECORDList(params?: any) {
|
||||||
@ -15,3 +16,20 @@ export async function handleGetBEHAVIORRECORDList(params?: any) {
|
|||||||
}
|
}
|
||||||
return data.Result_Data
|
return data.Result_Data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 小程序的操作记录从这里拿
|
||||||
|
export async function handleGetBEHAVIORRECORDListCloud(params?: any) {
|
||||||
|
const data = await requestCloud('/Platform/GetBEHAVIORRECORDList', {
|
||||||
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
...params,
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
return data.Result_Data
|
||||||
|
}
|
||||||
@ -753,13 +753,59 @@ const RoleList: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
||||||
options={[
|
options={
|
||||||
{ label: '业主', value: 1000 },
|
// [
|
||||||
{ label: '商户', value: 2000 },
|
// { label: '业主', value: 1000 },
|
||||||
{ label: '游客', value: 3000 },
|
// { label: '商户', value: 2000 },
|
||||||
{ label: '供应商', value: 4000 },
|
// { label: '游客', value: 3000 },
|
||||||
{ label: '内部人员', value: 9000 }
|
// { label: '供应商', value: 4000 },
|
||||||
]}></ProFormSelect>
|
// { label: '内部人员', value: 9000 }
|
||||||
|
// ]
|
||||||
|
bigTabSelect === '1' ? currentUser?.UserPattern === 9000 ?
|
||||||
|
[
|
||||||
|
{
|
||||||
|
key: '1000',
|
||||||
|
label: "业主",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '4000',
|
||||||
|
label: "供应商",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '2000',
|
||||||
|
label: "商户",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '3000',
|
||||||
|
label: "游客",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
key: '9000',
|
||||||
|
label: "内部人员",
|
||||||
|
},
|
||||||
|
] : currentUser?.UserPattern === 1000 ? [
|
||||||
|
{
|
||||||
|
key: '1000',
|
||||||
|
label: "业主",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '4000',
|
||||||
|
label: "供应商",
|
||||||
|
}
|
||||||
|
] : [] : [
|
||||||
|
{
|
||||||
|
key: '1000',
|
||||||
|
label: "业主",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '4000',
|
||||||
|
label: "供应商",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
}></ProFormSelect>
|
||||||
{currentUser?.UserPattern === 9000 && <ProFormSelect
|
{currentUser?.UserPattern === 9000 && <ProFormSelect
|
||||||
name="SYSTEMROLE_PROVINCE"
|
name="SYSTEMROLE_PROVINCE"
|
||||||
label="业主单位"
|
label="业主单位"
|
||||||
|
|||||||
@ -82,16 +82,16 @@ const ServerpartCardList: React.FC<ServerpartProps> = ({ serverpartList, current
|
|||||||
}}
|
}}
|
||||||
toolBarRender={() => {
|
toolBarRender={() => {
|
||||||
return index === 0 ? [
|
return index === 0 ? [
|
||||||
<Button
|
// <Button
|
||||||
key="new"
|
// key="new"
|
||||||
icon={<PlusOutlined />}
|
// icon={<PlusOutlined />}
|
||||||
type="primary"
|
// type="primary"
|
||||||
onClick={() => {
|
// onClick={() => {
|
||||||
setPermissionApply({ ...permissionApply, PERMISSIONAPPLY_TYPE: 5000 })
|
// setPermissionApply({ ...permissionApply, PERMISSIONAPPLY_TYPE: 5000 })
|
||||||
handleModalVisible(true)
|
// handleModalVisible(true)
|
||||||
}}>
|
// }}>
|
||||||
权限变更
|
// 权限变更
|
||||||
</Button>,
|
// </Button>,
|
||||||
] : [];
|
] : [];
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -116,6 +116,11 @@ const SecurityView: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser })
|
|||||||
const newValue = { ...value, USER_ID_Encrypted: currentUser?.ID_Encrypted }
|
const newValue = { ...value, USER_ID_Encrypted: currentUser?.ID_Encrypted }
|
||||||
let success = null
|
let success = null
|
||||||
if (changeType === 'password') {
|
if (changeType === 'password') {
|
||||||
|
if (newValue.NewPassword !== newValue.ComfirmPassword) {
|
||||||
|
message.error('两次输入的密码不一致')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
delete newValue.ComfirmPassword
|
delete newValue.ComfirmPassword
|
||||||
|
|
||||||
success = await handelResetPassWord({ ...newValue, DataType: 1000 })
|
success = await handelResetPassWord({ ...newValue, DataType: 1000 })
|
||||||
|
|||||||
@ -22,9 +22,9 @@ export async function handleGetNOTICEINFOList(params?: any) {
|
|||||||
|
|
||||||
// 编辑和新增高速头条
|
// 编辑和新增高速头条
|
||||||
export async function handleSynchroNOTICEINFO(params?: any) {
|
export async function handleSynchroNOTICEINFO(params?: any) {
|
||||||
const data = await request(`/Notice/SynchroNOTICEINFO`, {
|
const data = await request(`/WisdomServerpart/SynchroNOTICEINFO`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: params,
|
data: { ...params, requestEncryption: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (data.Result_Code !== 100) {
|
if (data.Result_Code !== 100) {
|
||||||
@ -36,9 +36,9 @@ export async function handleSynchroNOTICEINFO(params?: any) {
|
|||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
export async function handleDeleteNOTICEINFO(params?: any) {
|
export async function handleDeleteNOTICEINFO(params?: any) {
|
||||||
const data = await request(`/Notice/DeleteNOTICEINFO`, {
|
const data = await request(`/WisdomServerpart/DeleteNOTICEINFO`, {
|
||||||
method: 'GET',
|
method: 'POST',
|
||||||
params,
|
data: { ...params, requestEncryption: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (data.Result_Code !== 100) {
|
if (data.Result_Code !== 100) {
|
||||||
|
|||||||
@ -1111,6 +1111,8 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
if (!selectAssociationServerpart) {
|
if (!selectAssociationServerpart) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
console.log('selectAssociationServerpartselectAssociationServerpart', selectAssociationServerpart);
|
||||||
|
|
||||||
const req: any = {
|
const req: any = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
SERVERPART_IDS: selectAssociationServerpart,
|
SERVERPART_IDS: selectAssociationServerpart,
|
||||||
@ -1124,7 +1126,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
SortStr: "SHOPTRADE,SHOPSHORTNAME,SHOPREGION,SERVERPART_CODE",
|
SortStr: "SHOPTRADE,SHOPSHORTNAME,SHOPREGION",
|
||||||
}
|
}
|
||||||
const data = await handleGetServerpartShopList(req)
|
const data = await handleGetServerpartShopList(req)
|
||||||
console.log('datadatadatadatadata', data);
|
console.log('datadatadatadatadata', data);
|
||||||
|
|||||||
@ -42,8 +42,8 @@ const ActiveMemberStatistics: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
|
|
||||||
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
||||||
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
||||||
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj')
|
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObjIsAllOK')
|
||||||
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList')
|
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNListIsAllOK')
|
||||||
|
|
||||||
|
|
||||||
const handleGetData = async (formData?: any) => {
|
const handleGetData = async (formData?: any) => {
|
||||||
|
|||||||
@ -143,20 +143,20 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
dataIndex: 'ISSHOW',
|
// dataIndex: 'ISSHOW',
|
||||||
// title: '小程序埋点是显示',
|
// // title: '小程序埋点是显示',
|
||||||
title: '有效状态',
|
// title: '有效状态',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 150,
|
// width: 150,
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
hideInSearch: true,
|
// hideInSearch: true,
|
||||||
valueType: "select",
|
// valueType: "select",
|
||||||
valueEnum: {
|
// valueEnum: {
|
||||||
"1": "有效",
|
// "1": "有效",
|
||||||
"0": "无效"
|
// "0": "无效"
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
dataIndex: 'UPDATE_STAFF_NAME',
|
dataIndex: 'UPDATE_STAFF_NAME',
|
||||||
title: '修改人员名称',
|
title: '修改人员名称',
|
||||||
@ -224,6 +224,10 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p
|
|||||||
} else {
|
} else {
|
||||||
message.success('删除成功!');
|
message.success('删除成功!');
|
||||||
actionRef.current?.reload()
|
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,
|
...res,
|
||||||
UPDATE_STAFF_ID: currentUser?.ID,
|
UPDATE_STAFF_ID: currentUser?.ID,
|
||||||
UPDATE_STAFF_NAME: currentUser?.Name,
|
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 {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
@ -246,9 +251,12 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p
|
|||||||
CREATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
CREATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
UPDATE_STAFF_ID: currentUser?.ID,
|
UPDATE_STAFF_ID: currentUser?.ID,
|
||||||
UPDATE_STAFF_NAME: currentUser?.Name,
|
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)
|
const data = await handeSynchroWECHATAPPBURYPOINT(req)
|
||||||
handleConfirmLoading(false)
|
handleConfirmLoading(false)
|
||||||
if (data.Result_Code === 100) {
|
if (data.Result_Code === 100) {
|
||||||
@ -282,7 +290,8 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p
|
|||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
// WECHATAPP_APPID: "wxee018fb96955552a"
|
// WECHATAPP_APPID: "wxee018fb96955552a"
|
||||||
WECHATAPP_APPID: params?.WECHATAPP_APPID || "",
|
WECHATAPP_APPID: params?.WECHATAPP_APPID || "",
|
||||||
ISSHOW: 1
|
ISSHOW: 1,
|
||||||
|
WECHATAPPBURYPOINT_STATE: 1
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999,
|
PageSize: 999,
|
||||||
@ -384,8 +393,6 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p
|
|||||||
footer={<ModalFooter
|
footer={<ModalFooter
|
||||||
hideDelete={!currentRow?.WECHATAPPBURYPOINT_ID}
|
hideDelete={!currentRow?.WECHATAPPBURYPOINT_ID}
|
||||||
handleDelete={async () => {
|
handleDelete={async () => {
|
||||||
console.log('currentRow', currentRow);
|
|
||||||
|
|
||||||
await handelDelete(currentRow?.WECHATAPPBURYPOINT_ID)
|
await handelDelete(currentRow?.WECHATAPPBURYPOINT_ID)
|
||||||
}}
|
}}
|
||||||
handleCancel={() => {
|
handleCancel={() => {
|
||||||
@ -464,6 +471,11 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p
|
|||||||
name="WECHATAPP_APPID"
|
name="WECHATAPP_APPID"
|
||||||
label="小程序名称"
|
label="小程序名称"
|
||||||
options={WECHATAPP_APPID}
|
options={WECHATAPP_APPID}
|
||||||
|
fieldProps={{
|
||||||
|
onChange: (e, option) => {
|
||||||
|
formRef.current?.setFieldsValue({ WECHATAPPSIGN_NAME: option?.label || "" })
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12} style={{ display: 'none' }}>
|
<Col span={12} style={{ display: 'none' }}>
|
||||||
@ -472,13 +484,13 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p
|
|||||||
label="小程序名称"
|
label="小程序名称"
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="ISSHOW"
|
name="ISSHOW"
|
||||||
label="有效状态"
|
label="有效状态"
|
||||||
options={[{ label: "有效", value: 1 }, { label: "无效", value: 0 }]}
|
options={[{ label: "有效", value: 1 }, { label: "无效", value: 0 }]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col> */}
|
||||||
</Row>
|
</Row>
|
||||||
</ProForm>
|
</ProForm>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@ -44,8 +44,8 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine
|
|||||||
|
|
||||||
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
||||||
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
||||||
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj')
|
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObjIsAllOK')
|
||||||
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList')
|
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNListIsAllOK')
|
||||||
|
|
||||||
|
|
||||||
const handleGetData = async (formData?: any) => {
|
const handleGetData = async (formData?: any) => {
|
||||||
|
|||||||
@ -455,8 +455,9 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
|||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
CONSUMPTIONRECORD_DATE_Start: params?.CONSUMPTIONRECORD_DATE_Start || "",
|
CONSUMPTIONRECORD_DATE_Start: params?.CONSUMPTIONRECORD_DATE_Start || "",
|
||||||
CONSUMPTIONRECORD_DATE_End: params?.CONSUMPTIONRECORD_DATE_End || "",
|
CONSUMPTIONRECORD_DATE_End: params?.CONSUMPTIONRECORD_DATE_End || "",
|
||||||
CONSUMPTIONRECORD_TYPE: params?.CONSUMPTIONRECORD_TYPE === '0' ? '' : params?.CONSUMPTIONRECORD_TYPE,
|
CONSUMPTIONRECORD_TYPES: params?.CONSUMPTIONRECORD_TYPE === '0' ? '' : params?.CONSUMPTIONRECORD_TYPE,
|
||||||
CONSUMPTIONRECORD_STATES: '1010,2000,2010,3000,8000,8010,8020,8900,8999',
|
// 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() : ""
|
MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : ""
|
||||||
},
|
},
|
||||||
PageIndex: params?.current,
|
PageIndex: params?.current,
|
||||||
|
|||||||
@ -131,25 +131,25 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
dataIndex: 'FIELDENUM_STATUS',
|
// dataIndex: 'FIELDENUM_STATUS',
|
||||||
title: '有效状态',
|
// title: '有效状态',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 120,
|
// width: 120,
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
valueType: "select",
|
// valueType: "select",
|
||||||
// valueEnum: {
|
// // valueEnum: {
|
||||||
// "1": "有效",
|
// // "1": "有效",
|
||||||
// "0": "无效"
|
// // "0": "无效"
|
||||||
|
// // },
|
||||||
|
// fieldProps: {
|
||||||
|
// options: [
|
||||||
|
// { label: '有效', value: "1" },
|
||||||
|
// { label: '无效', value: "0" }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// initialValue: "1"
|
||||||
// },
|
// },
|
||||||
fieldProps: {
|
|
||||||
options: [
|
|
||||||
{ label: '有效', value: "1" },
|
|
||||||
{ label: '无效', value: "0" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
initialValue: "1"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
dataIndex: 'FIELDENUM_DESC',
|
dataIndex: 'FIELDENUM_DESC',
|
||||||
title: '备注说明',
|
title: '备注说明',
|
||||||
@ -225,12 +225,14 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
req = {
|
req = {
|
||||||
...currentRow,
|
...currentRow,
|
||||||
...res,
|
...res,
|
||||||
|
FIELDENUM_STATUS: 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
...res,
|
...res,
|
||||||
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
|
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
|
||||||
FIELDENUM_PID: -1,
|
FIELDENUM_PID: -1,
|
||||||
|
FIELDENUM_STATUS: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const data = await handeSynchroFIELDENUM(req)
|
const data = await handeSynchroFIELDENUM(req)
|
||||||
@ -271,7 +273,7 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
FIELDEXPLAIN_FIELD: 'CONSUMPTIONRECORD_TYPE',
|
FIELDEXPLAIN_FIELD: 'CONSUMPTIONRECORD_TYPE',
|
||||||
FIELDEXPLAIN_ID: "",
|
FIELDEXPLAIN_ID: "",
|
||||||
FIELDENUM_PID: "",
|
FIELDENUM_PID: "",
|
||||||
FIELDENUM_STATUS: params?.FIELDENUM_STATUS,
|
FIELDENUM_STATUS: 1,
|
||||||
SearchKey: ""
|
SearchKey: ""
|
||||||
}
|
}
|
||||||
const data = await handeGetNestingFIELDENUMList(req);
|
const data = await handeGetNestingFIELDENUMList(req);
|
||||||
@ -337,7 +339,7 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
onFocus={() => { }}
|
onFocus={() => { }}
|
||||||
onBlur={() => { }}
|
onBlur={() => { }}
|
||||||
>
|
>
|
||||||
{currentRow ? '更新会员等级类别' : '新建会员等级类别'}
|
{currentRow ? '更新消费类型' : '新建消费类型'}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
@ -493,16 +495,16 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormDigit
|
<ProFormDigit
|
||||||
name="FIELDENUM_VALUE"
|
name="FIELDENUM_VALUE"
|
||||||
label="等级枚举"
|
label="类别枚举"
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入等级枚举"
|
message: "请输入类别枚举"
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="FIELDENUM_STATUS"
|
name="FIELDENUM_STATUS"
|
||||||
label="有效状态"
|
label="有效状态"
|
||||||
@ -514,7 +516,7 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col> */}
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormTextArea
|
<ProFormTextArea
|
||||||
name="FIELDENUM_DESC"
|
name="FIELDENUM_DESC"
|
||||||
|
|||||||
@ -132,19 +132,19 @@ const MEMBERSHIPTYPEConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
dataIndex: 'FIELDENUM_STATUS',
|
// dataIndex: 'FIELDENUM_STATUS',
|
||||||
title: '有效状态',
|
// title: '有效状态',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 120,
|
// width: 120,
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
valueType: "select",
|
// valueType: "select",
|
||||||
valueEnum: {
|
// valueEnum: {
|
||||||
"1": "有效",
|
// "1": "有效",
|
||||||
"0": "无效"
|
// "0": "无效"
|
||||||
},
|
// },
|
||||||
initialValue: "1"
|
// initialValue: "1"
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
dataIndex: 'FIELDENUM_DESC',
|
dataIndex: 'FIELDENUM_DESC',
|
||||||
title: '备注说明',
|
title: '备注说明',
|
||||||
@ -220,16 +220,20 @@ const MEMBERSHIPTYPEConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
req = {
|
req = {
|
||||||
...currentRow,
|
...currentRow,
|
||||||
...res,
|
...res,
|
||||||
|
FIELDENUM_STATUS: 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
...res,
|
...res,
|
||||||
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
|
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
|
||||||
FIELDENUM_PID: -1,
|
FIELDENUM_PID: -1,
|
||||||
|
FIELDENUM_STATUS: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const data = await handeSynchroFIELDENUM(req)
|
const data = await handeSynchroFIELDENUM(req)
|
||||||
handleConfirmLoading(false)
|
handleConfirmLoading(false)
|
||||||
|
console.log('datadatadata', data);
|
||||||
|
|
||||||
if (data.Result_Code === 100) {
|
if (data.Result_Code === 100) {
|
||||||
message.success("新增成功!")
|
message.success("新增成功!")
|
||||||
handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}【${data.Result_Data.FIELDENUM_NAME}】`)
|
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_FIELD: 'MEMBERSHIP_TYPE',
|
||||||
FIELDEXPLAIN_ID: "",
|
FIELDEXPLAIN_ID: "",
|
||||||
FIELDENUM_PID: "",
|
FIELDENUM_PID: "",
|
||||||
FIELDENUM_STATUS: params?.FIELDENUM_STATUS,
|
FIELDENUM_STATUS: 1,
|
||||||
SearchKey: ""
|
SearchKey: ""
|
||||||
}
|
}
|
||||||
const data = await handeGetNestingFIELDENUMList(req);
|
const data = await handeGetNestingFIELDENUMList(req);
|
||||||
@ -346,7 +350,7 @@ const MEMBERSHIPTYPEConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
onFocus={() => { }}
|
onFocus={() => { }}
|
||||||
onBlur={() => { }}
|
onBlur={() => { }}
|
||||||
>
|
>
|
||||||
{currentRow ? '更新售后类别' : '新建售后类别'}
|
{currentRow ? '更新会员类型' : '新建会员类型'}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
@ -501,16 +505,16 @@ const MEMBERSHIPTYPEConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormDigit
|
<ProFormDigit
|
||||||
name="FIELDENUM_VALUE"
|
name="FIELDENUM_VALUE"
|
||||||
label="售后枚举"
|
label="类型枚举"
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入售后枚举"
|
message: "请输入类型枚举"
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="FIELDENUM_STATUS"
|
name="FIELDENUM_STATUS"
|
||||||
label="有效状态"
|
label="有效状态"
|
||||||
@ -522,7 +526,7 @@ const MEMBERSHIPTYPEConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col> */}
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormTextArea
|
<ProFormTextArea
|
||||||
name="FIELDENUM_DESC"
|
name="FIELDENUM_DESC"
|
||||||
|
|||||||
@ -132,19 +132,19 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
dataIndex: 'FIELDENUM_STATUS',
|
// dataIndex: 'FIELDENUM_STATUS',
|
||||||
title: '有效状态',
|
// title: '有效状态',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 120,
|
// width: 120,
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
valueType: "select",
|
// valueType: "select",
|
||||||
valueEnum: {
|
// valueEnum: {
|
||||||
"1": "有效",
|
// "1": "有效",
|
||||||
"0": "无效"
|
// "0": "无效"
|
||||||
},
|
// },
|
||||||
initialValue: "1"
|
// initialValue: "1"
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
dataIndex: 'FIELDENUM_DESC',
|
dataIndex: 'FIELDENUM_DESC',
|
||||||
title: '备注说明',
|
title: '备注说明',
|
||||||
@ -220,12 +220,14 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
req = {
|
req = {
|
||||||
...currentRow,
|
...currentRow,
|
||||||
...res,
|
...res,
|
||||||
|
FIELDENUM_STATUS: 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
...res,
|
...res,
|
||||||
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
|
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
|
||||||
FIELDENUM_PID: -1,
|
FIELDENUM_PID: -1,
|
||||||
|
FIELDENUM_STATUS: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const data = await handeSynchroFIELDENUM(req)
|
const data = await handeSynchroFIELDENUM(req)
|
||||||
@ -267,7 +269,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
FIELDEXPLAIN_FIELD: 'GROWTH_TYPE',
|
FIELDEXPLAIN_FIELD: 'GROWTH_TYPE',
|
||||||
FIELDEXPLAIN_ID: "",
|
FIELDEXPLAIN_ID: "",
|
||||||
FIELDENUM_PID: "",
|
FIELDENUM_PID: "",
|
||||||
FIELDENUM_STATUS: params?.FIELDENUM_STATUS,
|
FIELDENUM_STATUS: 1,
|
||||||
SearchKey: ""
|
SearchKey: ""
|
||||||
}
|
}
|
||||||
const data = await handeGetNestingFIELDENUMList(req);
|
const data = await handeGetNestingFIELDENUMList(req);
|
||||||
@ -304,7 +306,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
handleModalVisible(true);
|
handleModalVisible(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
售后服务类别
|
成长值枚举
|
||||||
</Button>,
|
</Button>,
|
||||||
],
|
],
|
||||||
}}
|
}}
|
||||||
@ -346,7 +348,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
onFocus={() => { }}
|
onFocus={() => { }}
|
||||||
onBlur={() => { }}
|
onBlur={() => { }}
|
||||||
>
|
>
|
||||||
{currentRow ? '更新售后类别' : '新建售后类别'}
|
{currentRow ? '更新成长值枚举' : '新建成长值枚举'}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
@ -501,7 +503,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormDigit
|
<ProFormDigit
|
||||||
name="FIELDENUM_VALUE"
|
name="FIELDENUM_VALUE"
|
||||||
label="售后枚举"
|
label="成长值枚举"
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@ -510,7 +512,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="FIELDENUM_STATUS"
|
name="FIELDENUM_STATUS"
|
||||||
label="有效状态"
|
label="有效状态"
|
||||||
@ -522,7 +524,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col> */}
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormTextArea
|
<ProFormTextArea
|
||||||
name="FIELDENUM_DESC"
|
name="FIELDENUM_DESC"
|
||||||
|
|||||||
@ -48,7 +48,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
let GROWTHTYPEList = session.get('GROWTHTYPEList')
|
let GROWTHTYPEList = session.get('GROWTHTYPEList')
|
||||||
let GROWTHTYPEObj = session.get('GROWTHTYPEObj')
|
let GROWTHTYPEObj = session.get('GROWTHTYPEObj')
|
||||||
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj')
|
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj')
|
||||||
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList')
|
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNListIsAllOK')
|
||||||
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
||||||
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
||||||
|
|
||||||
@ -183,24 +183,24 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
// align: 'center',
|
// align: 'center',
|
||||||
// hideInSearch: true,
|
// hideInSearch: true,
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
dataIndex: 'GROWTHSETTING_STATE',
|
// dataIndex: 'GROWTHSETTING_STATE',
|
||||||
title: '有效状态',
|
// title: '有效状态',
|
||||||
width: 120,
|
// width: 120,
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
valueType: 'select',
|
// valueType: 'select',
|
||||||
// valueEnum: {
|
// // valueEnum: {
|
||||||
// "1": "有效",
|
// // "1": "有效",
|
||||||
// "0": "无效",
|
// // "0": "无效",
|
||||||
|
// // },
|
||||||
|
// initialValue: "1",
|
||||||
|
// fieldProps: {
|
||||||
|
// options: [
|
||||||
|
// { label: '有效', value: "1" },
|
||||||
|
// { label: '无效', value: "0" }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
// },
|
// },
|
||||||
initialValue: "1",
|
|
||||||
fieldProps: {
|
|
||||||
options: [
|
|
||||||
{ label: '有效', value: "1" },
|
|
||||||
{ label: '无效', value: "0" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// {
|
// {
|
||||||
// dataIndex: 'STAFF_NAME',
|
// dataIndex: 'STAFF_NAME',
|
||||||
// title: '操作人员',
|
// title: '操作人员',
|
||||||
@ -341,12 +341,14 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
reqList.push({
|
reqList.push({
|
||||||
...req,
|
...req,
|
||||||
...newValue,
|
...newValue,
|
||||||
|
GROWTHSETTING_STATE: 1,
|
||||||
MEMBERSHIP_TYPE: nowItem.value
|
MEMBERSHIP_TYPE: nowItem.value
|
||||||
})
|
})
|
||||||
reqListUpdateMsg.push(`${nowItem.label}【${GROWTHTYPEObj[newValue.GROWTHSETTING_TYPE]}】${MEMBERSHIPLEVELYNObj[newValue.PROMOTION_LEVEL]}`)
|
reqListUpdateMsg.push(`${nowItem.label}【${GROWTHTYPEObj[newValue.GROWTHSETTING_TYPE]}】${MEMBERSHIPLEVELYNObj[newValue.PROMOTION_LEVEL]}`)
|
||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
...newValue,
|
...newValue,
|
||||||
|
GROWTHSETTING_STATE: 1,
|
||||||
MEMBERSHIP_TYPE: nowItem.value
|
MEMBERSHIP_TYPE: nowItem.value
|
||||||
}
|
}
|
||||||
reqList.push(req)
|
reqList.push(req)
|
||||||
@ -447,7 +449,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
searchParameter: {
|
searchParameter: {
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
GROWTHSETTING_STATE: params?.GROWTHSETTING_STATE,
|
GROWTHSETTING_STATE: 1,
|
||||||
MEMBERSHIP_TYPES: params?.MEMBERSHIP_TYPE === 1 ? '' : params?.MEMBERSHIP_TYPE || ""
|
MEMBERSHIP_TYPES: params?.MEMBERSHIP_TYPE === 1 ? '' : params?.MEMBERSHIP_TYPE || ""
|
||||||
},
|
},
|
||||||
SortStr: "MEMBERSHIP_TYPE,MEMBERSHIP_LEVEL,PROMOTION_LEVEL desc",
|
SortStr: "MEMBERSHIP_TYPE,MEMBERSHIP_LEVEL,PROMOTION_LEVEL desc",
|
||||||
@ -903,7 +905,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="GROWTHSETTING_STATE"
|
name="GROWTHSETTING_STATE"
|
||||||
label="有效状态"
|
label="有效状态"
|
||||||
@ -913,7 +915,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
]}
|
]}
|
||||||
initialValue={1}
|
initialValue={1}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col> */}
|
||||||
|
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormTextArea
|
<ProFormTextArea
|
||||||
|
|||||||
@ -41,7 +41,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
const [showExportTable, setShowExportTable] = useState<boolean>(false)
|
const [showExportTable, setShowExportTable] = useState<boolean>(false)
|
||||||
// 查询的条件
|
// 查询的条件
|
||||||
const [searchParams, setSearchParams] = useState<any>()
|
const [searchParams, setSearchParams] = useState<any>()
|
||||||
// 头条类型 对象格式
|
// 招商类型 对象格式
|
||||||
const [NOTICEINFO_TYPES, setNOTICEINFO_TYPESOBJ] = useState<any>()
|
const [NOTICEINFO_TYPES, setNOTICEINFO_TYPESOBJ] = useState<any>()
|
||||||
const [NOTICEINFO_TYPESList, setNOTICEINFO_TYPESList] = useState<any>()
|
const [NOTICEINFO_TYPESList, setNOTICEINFO_TYPESList] = useState<any>()
|
||||||
// 显示新增窗口
|
// 显示新增窗口
|
||||||
@ -84,7 +84,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: <div style={{ textAlign: 'center' }}>头条类型</div>,
|
// title: <div style={{ textAlign: 'center' }}>招商类型</div>,
|
||||||
// dataIndex: 'NOTICEINFO_TYPES',
|
// dataIndex: 'NOTICEINFO_TYPES',
|
||||||
// valueType: 'treeSelect',
|
// valueType: 'treeSelect',
|
||||||
// align: 'center',
|
// align: 'center',
|
||||||
@ -159,6 +159,22 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
ellipsis: true
|
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: '备注说明',
|
title: '备注说明',
|
||||||
dataIndex: "NOTICEINFO_DESC",
|
dataIndex: "NOTICEINFO_DESC",
|
||||||
@ -198,7 +214,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 新增头条
|
// 新增招商
|
||||||
const handleAddHeadlines = async (obj: any) => {
|
const handleAddHeadlines = async (obj: any) => {
|
||||||
console.log('obj', obj);
|
console.log('obj', obj);
|
||||||
|
|
||||||
@ -237,7 +253,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
fileList.forEach((item: any) => {
|
fileList.forEach((item: any) => {
|
||||||
formData.append('files[]', item.originFileObj);
|
formData.append('files[]', item.originFileObj);
|
||||||
formData.append('ImageName', item.name);
|
// formData.append('ImageName', item.name);
|
||||||
})
|
})
|
||||||
formData.append('TableType', '1401');
|
formData.append('TableType', '1401');
|
||||||
formData.append('TableId', data.Result_Data.NOTICEINFO_ID.toString());
|
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 handleDeleteLine = async (id: any) => {
|
||||||
const data = await handleDeleteNOTICEINFO({ NOTICEINFOId: id })
|
const data = await handleDeleteNOTICEINFO({ NOTICEINFOId: id })
|
||||||
if (data.Result_Code === 100) {
|
if (data.Result_Code === 100) {
|
||||||
@ -321,13 +337,14 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
const req: any = {
|
const req: any = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
NOTICEINFO_TYPES: 1050,
|
NOTICEINFO_TYPES: 1050,
|
||||||
// START_DATE_Start: params?.StartDate,
|
START_DATE_End: params?.EndDate,
|
||||||
// END_DATE_Start: params?.EndDate,
|
END_DATE_Start: params?.StartDate,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
NOTICEINFO_STATE: 1
|
NOTICEINFO_STATE: 1
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
|
SortStr: 'OPERATE_DATE desc',
|
||||||
}
|
}
|
||||||
setSearchParams(params)
|
setSearchParams(params)
|
||||||
const data = await handleGetNOTICEINFOList(req)
|
const data = await handleGetNOTICEINFOList(req)
|
||||||
@ -342,7 +359,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
actions: [
|
actions: [
|
||||||
<Button type="primary" onClick={() => {
|
<Button type="primary" onClick={() => {
|
||||||
setShowAddModal(true)
|
setShowAddModal(true)
|
||||||
}}>新增头条</Button>
|
}}>新增招商信息</Button>
|
||||||
]
|
]
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -366,7 +383,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
|
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
title={currentRow ? "编辑头条" : "新增头条"}
|
title={currentRow ? "编辑招商信息" : "新增招商信息"}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
width={900}
|
width={900}
|
||||||
bodyStyle={{
|
bodyStyle={{
|
||||||
@ -423,11 +440,11 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
<Row gutter={16}>
|
<Row gutter={16}>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormTreeSelect
|
<ProFormTreeSelect
|
||||||
label={'头条类型'}
|
label={'招商类型'}
|
||||||
name={'NOTICEINFO_TYPE'}
|
name={'NOTICEINFO_TYPE'}
|
||||||
rules={[{
|
rules={[{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择头条类型'
|
message: '请选择招商类型'
|
||||||
}]}
|
}]}
|
||||||
request={async () => {
|
request={async () => {
|
||||||
const data = await getFieldEnumTree({ FieldExplainField: 'NOTICEINFO_TYPE' })
|
const data = await getFieldEnumTree({ FieldExplainField: 'NOTICEINFO_TYPE' })
|
||||||
@ -449,11 +466,11 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
|
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
label={'头条标题'}
|
label={'招商标题'}
|
||||||
name={'NOTICEINFO_TITLE'}
|
name={'NOTICEINFO_TITLE'}
|
||||||
rules={[{
|
rules={[{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入标题内容'
|
message: '请输入招商标题'
|
||||||
}]}
|
}]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
@ -516,7 +533,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormTextArea
|
<ProFormTextArea
|
||||||
label={'头条内容'}
|
label={'招商内容'}
|
||||||
name={'NOTICEINFO_CONTENT'}
|
name={'NOTICEINFO_CONTENT'}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
@ -529,7 +546,7 @@ const InvestmentInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormUploadButton
|
<ProFormUploadButton
|
||||||
name="file"
|
name="file"
|
||||||
label="上传头条图片"
|
label="上传招商图片"
|
||||||
labelCol={{ span: 3 }}
|
labelCol={{ span: 3 }}
|
||||||
wrapperCol={{ span: 20 }}
|
wrapperCol={{ span: 20 }}
|
||||||
fileList={fileList}
|
fileList={fileList}
|
||||||
|
|||||||
@ -320,7 +320,7 @@ const LibraryInformationManager: React.FC<{ currentUser: CurrentUser }> = (props
|
|||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
}}
|
}}
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
title={currentRow?.PICTURE_ID ? '编辑图片' : "新增卡券"}
|
title={currentRow?.PICTURE_ID ? '编辑图片' : "新增图片"}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
ModalFormRef?.current?.validateFields().then(async (res) => {
|
ModalFormRef?.current?.validateFields().then(async (res) => {
|
||||||
await handleSynchroImage(res)
|
await handleSynchroImage(res)
|
||||||
@ -402,7 +402,21 @@ const LibraryInformationManager: React.FC<{ currentUser: CurrentUser }> = (props
|
|||||||
} else {
|
} else {
|
||||||
message.error("您上传的图片不存在.")
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@ -392,7 +392,7 @@ const LostandFoundAPPliance: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
title={currentRow ? "编辑失物信息" : "新增失物信息"}
|
title={currentRow ? "失物信息详情" : "新增失物信息"}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
width={900}
|
width={900}
|
||||||
bodyStyle={{
|
bodyStyle={{
|
||||||
|
|||||||
@ -141,20 +141,20 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
// ellipsis: true,
|
// ellipsis: true,
|
||||||
// valueEnum: brandObj
|
// valueEnum: brandObj
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
dataIndex: 'BRAND_STATE',
|
// dataIndex: 'BRAND_STATE',
|
||||||
title: '有效状态',
|
// title: '有效状态',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 120,
|
// width: 120,
|
||||||
valueType: 'select',
|
// valueType: 'select',
|
||||||
fieldProps: {
|
// fieldProps: {
|
||||||
options: [
|
// options: [
|
||||||
{ label: '有效', value: "1" },
|
// { label: '有效', value: "1" },
|
||||||
{ label: '无效', value: "0" }
|
// { label: '无效', value: "0" }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
initialValue: "1"
|
// initialValue: "1"
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
dataIndex: 'BRAND_DESC',
|
dataIndex: 'BRAND_DESC',
|
||||||
title: '品牌介绍',
|
title: '品牌介绍',
|
||||||
@ -249,6 +249,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
STAFF_ID: currentUser?.ID,
|
STAFF_ID: currentUser?.ID,
|
||||||
STAFF_NAME: currentUser?.Name,
|
STAFF_NAME: currentUser?.Name,
|
||||||
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
BRAND_STATE: 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
@ -259,6 +260,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
STAFF_ID: currentUser?.ID,
|
STAFF_ID: currentUser?.ID,
|
||||||
STAFF_NAME: currentUser?.Name,
|
STAFF_NAME: currentUser?.Name,
|
||||||
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
BRAND_STATE: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -322,7 +324,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
BRAND_TYPE: params?.BRAND_TYPE,
|
BRAND_TYPE: params?.BRAND_TYPE,
|
||||||
BRAND_STATE: params?.BRAND_STATE === '-1' ? '' : params?.BRAND_STATE,
|
BRAND_STATE: 1,
|
||||||
BRAND_CATEGORY: 2000
|
BRAND_CATEGORY: 2000
|
||||||
},
|
},
|
||||||
keyWord: {
|
keyWord: {
|
||||||
@ -440,6 +442,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
</Draggable>
|
</Draggable>
|
||||||
}}
|
}}
|
||||||
footer={<ModalFooter
|
footer={<ModalFooter
|
||||||
|
confirmLoading={confirmLoading}
|
||||||
hideDelete={!currentRow?.BRAND_ID}
|
hideDelete={!currentRow?.BRAND_ID}
|
||||||
handleDelete={async () => {
|
handleDelete={async () => {
|
||||||
await handelDelete(currentRow?.BRAND_ID)
|
await handelDelete(currentRow?.BRAND_ID)
|
||||||
@ -473,6 +476,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
}}
|
}}
|
||||||
onFinish={async (values) => {
|
onFinish={async (values) => {
|
||||||
let newValue: any = { ...values };
|
let newValue: any = { ...values };
|
||||||
|
handleConfirmLoading(true)
|
||||||
if (currentRow) {
|
if (currentRow) {
|
||||||
// 编辑数据
|
// 编辑数据
|
||||||
newValue = { ...values, BRAND_ID: currentRow.BRAND_ID };
|
newValue = { ...values, BRAND_ID: currentRow.BRAND_ID };
|
||||||
@ -539,7 +543,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
label="品牌名称"
|
label="品牌名称"
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="BRAND_STATE"
|
name="BRAND_STATE"
|
||||||
label="有效状态"
|
label="有效状态"
|
||||||
@ -548,7 +552,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
{ label: "无效", value: 0 },
|
{ label: "无效", value: 0 },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col> */}
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormUploadButton
|
<ProFormUploadButton
|
||||||
label={"品牌图标"}
|
label={"品牌图标"}
|
||||||
|
|||||||
@ -61,6 +61,7 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined, isC
|
|||||||
bottom: clientHeight - (targetRect.bottom - uiData.y),
|
bottom: clientHeight - (targetRect.bottom - uiData.y),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
let MEMBERSHIP_TYPEObj = session.get('MEMBERSHIP_TYPEObj');
|
||||||
|
|
||||||
// 定义列表字段内容
|
// 定义列表字段内容
|
||||||
const columns: any = [
|
const columns: any = [
|
||||||
@ -149,6 +150,10 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined, isC
|
|||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
width: 150,
|
width: 150,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: {
|
||||||
|
...MEMBERSHIP_TYPEObj,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'MALLCOMMENT_SCORE',
|
dataIndex: 'MALLCOMMENT_SCORE',
|
||||||
@ -262,7 +267,6 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined, isC
|
|||||||
{
|
{
|
||||||
isComponent ? '' :
|
isComponent ? '' :
|
||||||
<LeftSelectMallType setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} setData={setLeftTreeData} isShowAllInTree={true} />
|
<LeftSelectMallType setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} setData={setLeftTreeData} isShowAllInTree={true} />
|
||||||
|
|
||||||
}
|
}
|
||||||
<div style={{
|
<div style={{
|
||||||
width: isComponent ? '100%' : !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
width: isComponent ? '100%' : !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||||
@ -301,6 +305,7 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined, isC
|
|||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
ISVALID: 1,
|
ISVALID: 1,
|
||||||
MEMBERSHIP_ID: parentDetail?.MEMBERSHIP_ID,
|
MEMBERSHIP_ID: parentDetail?.MEMBERSHIP_ID,
|
||||||
|
USERDEFINEDTYPE_IDS: selectedId || ""
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { connect } from "umi";
|
|||||||
import type { CurrentUser } from "umi";
|
import type { CurrentUser } from "umi";
|
||||||
import type { ConnectState } from "@/models/connect";
|
import type { ConnectState } from "@/models/connect";
|
||||||
import React, { useRef, useState } from "react";
|
import React, { useRef, useState } from "react";
|
||||||
import { Button, Col, Modal, Row, type FormInstance } from "antd";
|
import { Button, Col, message, Modal, Row, Spin, type FormInstance } from "antd";
|
||||||
import type { ActionType } from "@ant-design/pro-table";
|
import type { ActionType } from "@ant-design/pro-table";
|
||||||
import ProTable from "@ant-design/pro-table";
|
import ProTable from "@ant-design/pro-table";
|
||||||
import PageTitleBox from "@/components/PageTitleBox";
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
@ -15,10 +15,13 @@ import ProForm, { ProFormSelect, ProFormText } from "@ant-design/pro-form";
|
|||||||
|
|
||||||
import orderIcon from '@/assets/detail/orderIcon.png'
|
import orderIcon from '@/assets/detail/orderIcon.png'
|
||||||
import closeIcon from '@/assets/detail/closeIcon.png'
|
import closeIcon from '@/assets/detail/closeIcon.png'
|
||||||
import { convertTreeFieldToNumber, handleSetlogSave } from "@/utils/format";
|
import { convertTreeFieldToNumber, formatTreeData, handleSetlogSave } from "@/utils/format";
|
||||||
import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal";
|
import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal";
|
||||||
import { highlightText } from "@/utils/highlightText";
|
import { highlightText } from "@/utils/highlightText";
|
||||||
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||||
|
import ReactHTMLTableToExcel from "react-html-table-to-excel";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, searchReq?: any }> = (props) => {
|
const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, searchReq?: any }> = (props) => {
|
||||||
const { currentUser, isComponent, searchReq } = props
|
const { currentUser, isComponent, searchReq } = props
|
||||||
@ -26,7 +29,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolea
|
|||||||
const actionRef = useRef<ActionType>();
|
const actionRef = useRef<ActionType>();
|
||||||
const formRef = useRef<FormInstance>();
|
const formRef = useRef<FormInstance>();
|
||||||
const modalRef = useRef<FormInstance>();
|
const modalRef = useRef<FormInstance>();
|
||||||
|
const downloadBtnRef = useRef<any>()
|
||||||
// 查询的条件
|
// 查询的条件
|
||||||
const [searchParams, setSearchParams] = useState<any>()
|
const [searchParams, setSearchParams] = useState<any>()
|
||||||
const [currentRow, setCurrentRow] = useState<any>();
|
const [currentRow, setCurrentRow] = useState<any>();
|
||||||
@ -39,6 +42,13 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolea
|
|||||||
const [currentSearchText, setCurrentSearchText] = useState<string>('')
|
const [currentSearchText, setCurrentSearchText] = useState<string>('')
|
||||||
// 导出的表格数据
|
// 导出的表格数据
|
||||||
const [reqDetailList, setReqDetailList] = useState<any>()
|
const [reqDetailList, setReqDetailList] = useState<any>()
|
||||||
|
// 导出的加载效果
|
||||||
|
const [showLoading, setShowLoading] = useState<boolean>(false)
|
||||||
|
const [MEMBERSHIP_TARGETOBJ, setMEMBERSHIP_TARGETOBJ] = useState<any>()
|
||||||
|
// 是否显示打印的表格
|
||||||
|
const [showExportTable, setShowExportTable] = useState<boolean>(false)
|
||||||
|
|
||||||
|
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
|
||||||
|
|
||||||
const onDraggaleStart = (event, uiData) => {
|
const onDraggaleStart = (event, uiData) => {
|
||||||
const { clientWidth, clientHeight } = window.document.documentElement;
|
const { clientWidth, clientHeight } = window.document.documentElement;
|
||||||
@ -120,20 +130,20 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolea
|
|||||||
initialValue: '0',
|
initialValue: '0',
|
||||||
hideInTable: true,
|
hideInTable: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: "支付方式",
|
// title: "支付方式",
|
||||||
dataIndex: "PAYMETHOD",
|
// dataIndex: "PAYMETHOD",
|
||||||
valueType: "select",
|
// valueType: "select",
|
||||||
valueEnum: {
|
// valueEnum: {
|
||||||
"0": "全部",
|
// "0": "全部",
|
||||||
"支付宝": "支付宝",
|
// "支付宝": "支付宝",
|
||||||
"微信": "微信",
|
// "微信": "微信",
|
||||||
"积分兑换": "积分兑换",
|
// "积分兑换": "积分兑换",
|
||||||
"余额支付": "余额支付",
|
// "余额支付": "余额支付",
|
||||||
},
|
// },
|
||||||
initialValue: '0',
|
// initialValue: '0',
|
||||||
hideInTable: true,
|
// hideInTable: true,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: "序号",
|
title: "序号",
|
||||||
dataIndex: "index",
|
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 (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
{
|
||||||
|
showLoading ?
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: '100%',
|
||||||
|
height: '100%',
|
||||||
|
background: 'rgba(0,0,0,0.1)',
|
||||||
|
position: 'fixed',
|
||||||
|
zIndex: 5,
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
padding: '15px 20px 10px',
|
||||||
|
background: '#fff',
|
||||||
|
borderRadius: '8px',
|
||||||
|
width: '200px'
|
||||||
|
}}>
|
||||||
|
<Spin />
|
||||||
|
<span style={{ marginLeft: '5px' }}>数据导出中...</span>
|
||||||
|
</div>
|
||||||
|
</div> : ''
|
||||||
|
}
|
||||||
|
|
||||||
|
<div className={`MallOrderManage${printIndex}`} style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }}>
|
||||||
|
{
|
||||||
|
showExportTable && reqDetailList && reqDetailList.length > 0 ?
|
||||||
|
<ProTable
|
||||||
|
columns={columns}
|
||||||
|
dataSource={reqDetailList}
|
||||||
|
pagination={false}
|
||||||
|
expandable={{
|
||||||
|
defaultExpandAllRows: true
|
||||||
|
}}
|
||||||
|
/> : ''
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
<div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} />
|
||||||
|
|
||||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||||
<div style={{
|
<div style={{
|
||||||
@ -708,6 +782,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolea
|
|||||||
SearchKeyValue: params?.searchText || "",
|
SearchKeyValue: params?.searchText || "",
|
||||||
MERCHANTS_IDS: params?.MERCHANTS_IDS || "",
|
MERCHANTS_IDS: params?.MERCHANTS_IDS || "",
|
||||||
MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "",
|
MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "",
|
||||||
|
PAYMETHOD: params?.PAYMETHOD || ""
|
||||||
// MERCHANTS_IDS: currentUser?.SupplierID
|
// MERCHANTS_IDS: currentUser?.SupplierID
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
@ -733,7 +808,37 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolea
|
|||||||
return { data: [], success: true }
|
return { data: [], success: true }
|
||||||
}}
|
}}
|
||||||
toolbar={{
|
toolbar={{
|
||||||
// actions: [
|
actions: [
|
||||||
|
<span style={{ visibility: 'hidden' }}>
|
||||||
|
<ReactHTMLTableToExcel
|
||||||
|
buttonText={'导出excel'}
|
||||||
|
ref={downloadBtnRef}
|
||||||
|
table="table-to-xls-MallOrderManage"
|
||||||
|
filename={`商城订单报表${searchParams?.ORDER_DATE_Start}-${searchParams?.ORDER_DATE_End}`}
|
||||||
|
sheet="sheet1"
|
||||||
|
/>
|
||||||
|
</span>,
|
||||||
|
<Button
|
||||||
|
key="new"
|
||||||
|
type="primary"
|
||||||
|
onClick={(e) => {
|
||||||
|
if (reqDetailList && reqDetailList.length > 0) {
|
||||||
|
setShowLoading(true)
|
||||||
|
setTimeout(() => {
|
||||||
|
setShowExportTable(true)
|
||||||
|
setTimeout(() => {
|
||||||
|
exportTable(e)
|
||||||
|
}, 100)
|
||||||
|
}, 100)
|
||||||
|
} else {
|
||||||
|
message.error('暂无数据可导出!')
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
导出excel
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
// <Button type={"primary"} onClick={() => {
|
// <Button type={"primary"} onClick={() => {
|
||||||
// // exportXlsxFromProColumnsExcelJS(exportColumnsNomal,
|
// // exportXlsxFromProColumnsExcelJS(exportColumnsNomal,
|
||||||
// // reqDetailList,
|
// // reqDetailList,
|
||||||
@ -752,7 +857,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolea
|
|||||||
// // }
|
// // }
|
||||||
// // )
|
// // )
|
||||||
// }}>导出财务结算Excel</Button>
|
// }}>导出财务结算Excel</Button>
|
||||||
// ]
|
]
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -86,28 +86,28 @@ const AddressDetail = ({ currentBigRow, currentUser, isComponent }: DetailProps)
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
dataIndex: 'RECEIVE_PROVINCE',
|
// dataIndex: 'RECEIVE_PROVINCE',
|
||||||
title: '省/直辖市',
|
// title: '省/直辖市',
|
||||||
width: 120,
|
// width: 120,
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
hideInSearch: true,
|
// hideInSearch: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
dataIndex: 'RECEIVE_CITY',
|
// dataIndex: 'RECEIVE_CITY',
|
||||||
title: '城市/直辖市',
|
// title: '省市区',
|
||||||
width: 150,
|
// width: 350,
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
hideInSearch: true,
|
// hideInSearch: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
dataIndex: 'RECEIVE_COUNTY',
|
// dataIndex: 'RECEIVE_COUNTY',
|
||||||
title: '区/县',
|
// title: '区/县',
|
||||||
width: 150,
|
// width: 150,
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
hideInSearch: true,
|
// hideInSearch: true,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
dataIndex: 'ADDRESS',
|
dataIndex: 'ADDRESS',
|
||||||
title: '收货地址',
|
title: '收货地址',
|
||||||
@ -317,8 +317,6 @@ const AddressDetail = ({ currentBigRow, currentUser, isComponent }: DetailProps)
|
|||||||
const req = {
|
const req = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
MEMBERSHIP_ID: currentBigRow?.MEMBERSHIP_ID,
|
MEMBERSHIP_ID: currentBigRow?.MEMBERSHIP_ID,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
|
||||||
OWNERUNIT_ID: 911,
|
|
||||||
ISVALID: 1
|
ISVALID: 1
|
||||||
},
|
},
|
||||||
PageIndex: params.current,
|
PageIndex: params.current,
|
||||||
@ -461,7 +459,7 @@ const AddressDetail = ({ currentBigRow, currentUser, isComponent }: DetailProps)
|
|||||||
label="手机号码"
|
label="手机号码"
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="RECEIVE_PROVINCE"
|
name="RECEIVE_PROVINCE"
|
||||||
label="省"
|
label="省"
|
||||||
@ -495,12 +493,12 @@ const AddressDetail = ({ currentBigRow, currentUser, isComponent }: DetailProps)
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col> */}
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="ADDRESS"
|
name="ADDRESS"
|
||||||
label="收货地址"
|
label="收货地址"
|
||||||
disabled
|
// disabled
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|||||||
@ -522,7 +522,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
|
|
||||||
const req = {
|
const req = {
|
||||||
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
OwnerUnitId: currentUser?.OwnerUnitId || "",
|
OwnerUnitId: "911",
|
||||||
Isvalid: 1,
|
Isvalid: 1,
|
||||||
PageIndex: params.current,
|
PageIndex: params.current,
|
||||||
PageSize: params?.pageSize,
|
PageSize: params?.pageSize,
|
||||||
|
|||||||
@ -485,7 +485,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined }
|
|||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
POINT_TYPE: selectTab === 1 ? '' : selectTab === 2 ? '1' : selectTab === 3 ? '-1' : '',
|
POINT_TYPE: selectTab === 1 ? '' : selectTab === 2 ? '1' : selectTab === 3 ? '-1' : '',
|
||||||
POINT_SOURCE: '',
|
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: {
|
keyWord: {
|
||||||
Key: "MEMBERSHIP_NAME",
|
Key: "MEMBERSHIP_NAME",
|
||||||
|
|||||||
@ -133,26 +133,26 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
dataIndex: 'AUTOTYPE_VALID',
|
// dataIndex: 'AUTOTYPE_VALID',
|
||||||
title: '有效状态',
|
// title: '有效状态',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 120,
|
// width: 120,
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
valueType: "select",
|
// valueType: "select",
|
||||||
// valueEnum: {
|
// // valueEnum: {
|
||||||
// "1": "有效",
|
// // "1": "有效",
|
||||||
// "0": "无效"
|
// // "0": "无效"
|
||||||
// },
|
// // },
|
||||||
initialValue: "1",
|
// initialValue: "1",
|
||||||
fieldProps: {
|
// fieldProps: {
|
||||||
options: [
|
// options: [
|
||||||
{ label: '有效', value: "1" },
|
// { label: '有效', value: "1" },
|
||||||
{ label: '无效', value: "0" }
|
// { label: '无效', value: "0" }
|
||||||
]
|
// ]
|
||||||
}
|
// }
|
||||||
|
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
dataIndex: 'AUTOTYPE_DESC',
|
dataIndex: 'AUTOTYPE_DESC',
|
||||||
title: '备注说明',
|
title: '备注说明',
|
||||||
@ -202,6 +202,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro
|
|||||||
STAFF_ID: currentUser?.ID,
|
STAFF_ID: currentUser?.ID,
|
||||||
STAFF_NAME: currentUser?.Name,
|
STAFF_NAME: currentUser?.Name,
|
||||||
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
AUTOTYPE_VALID: 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
@ -212,6 +213,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro
|
|||||||
STAFF_NAME: currentUser?.Name,
|
STAFF_NAME: currentUser?.Name,
|
||||||
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
ADDTIME: 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)
|
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 (
|
return (
|
||||||
<PageContainer header={{
|
<PageContainer header={{
|
||||||
title: '',
|
title: '',
|
||||||
@ -252,15 +270,15 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro
|
|||||||
AUTOTYPE_TYPEID: '2000',
|
AUTOTYPE_TYPEID: '2000',
|
||||||
AUTOTYPE_PID: "",
|
AUTOTYPE_PID: "",
|
||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
AUTOTYPE_VALID: params?.AUTOTYPE_VALID,
|
AUTOTYPE_VALID: 1,
|
||||||
SearchKey: params?.searchText || ""
|
SearchKey: params?.searchText || ""
|
||||||
}
|
}
|
||||||
const data = await handeGetNestingAUTOTYPEList(req);
|
const data = await handeGetNestingAUTOTYPEList(req);
|
||||||
console.log('datadatadatadatadata', data);
|
console.log('datadatadatadatadata', data);
|
||||||
setCurrentSearchText(params?.searchText || "")
|
setCurrentSearchText(params?.searchText || "")
|
||||||
handleSetlogSave(`点击查询按钮`)
|
handleSetlogSave(`点击查询按钮`)
|
||||||
if (data && data.length > 0) {
|
|
||||||
setTypeTreeData(data)
|
setTypeTreeData(data)
|
||||||
|
if (data && data.length > 0) {
|
||||||
return { data: data, success: true, total: data.length }
|
return { data: data, success: true, total: data.length }
|
||||||
}
|
}
|
||||||
return { data: [], success: true }
|
return { data: [], success: true }
|
||||||
@ -411,7 +429,8 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro
|
|||||||
request={async () => {
|
request={async () => {
|
||||||
if (typeTreeData && typeTreeData.length > 0) {
|
if (typeTreeData && typeTreeData.length > 0) {
|
||||||
let list: any = [{ AUTOTYPE_NAME: "默认类别", AUTOTYPE_ID: -1 }, ...typeTreeData]
|
let list: any = [{ AUTOTYPE_NAME: "默认类别", AUTOTYPE_ID: -1 }, ...typeTreeData]
|
||||||
return list
|
let res = markDisabled(list, currentRow?.AUTOTYPE_ID ? [currentRow?.AUTOTYPE_ID] : [])
|
||||||
|
return res
|
||||||
} else {
|
} else {
|
||||||
const req = {
|
const req = {
|
||||||
AUTOTYPE_TYPEID: '2000',
|
AUTOTYPE_TYPEID: '2000',
|
||||||
@ -422,9 +441,14 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro
|
|||||||
}
|
}
|
||||||
const data = await handeGetNestingAUTOTYPEList(req);
|
const data = await handeGetNestingAUTOTYPEList(req);
|
||||||
if (data && data.length > 0) {
|
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)
|
setTypeTreeData(data)
|
||||||
return data
|
return res
|
||||||
} else {
|
} else {
|
||||||
return [{ AUTOTYPE_NAME: "默认类别", AUTOTYPE_ID: -1 }]
|
return [{ AUTOTYPE_NAME: "默认类别", AUTOTYPE_ID: -1 }]
|
||||||
}
|
}
|
||||||
@ -473,7 +497,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro
|
|||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="AUTOTYPE_VALID"
|
name="AUTOTYPE_VALID"
|
||||||
label="有效状态"
|
label="有效状态"
|
||||||
@ -485,7 +509,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col> */}
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormTextArea
|
<ProFormTextArea
|
||||||
name="AUTOTYPE_DESC"
|
name="AUTOTYPE_DESC"
|
||||||
|
|||||||
@ -159,7 +159,7 @@ const LeftSelectMemberLevel = ({ setSelectedId, reload, actionRef, currentUser,
|
|||||||
<ProFormText
|
<ProFormText
|
||||||
name={'searchValue'}
|
name={'searchValue'}
|
||||||
fieldProps={{
|
fieldProps={{
|
||||||
placeholder: '请输入服务区名称'
|
placeholder: '请输入会员等级'
|
||||||
}}
|
}}
|
||||||
allowClear
|
allowClear
|
||||||
/>
|
/>
|
||||||
@ -179,7 +179,7 @@ const LeftSelectMemberLevel = ({ setSelectedId, reload, actionRef, currentUser,
|
|||||||
</div>
|
</div>
|
||||||
</div>}
|
</div>}
|
||||||
colSpan={!collapsible ? "300px" : "60px"}
|
colSpan={!collapsible ? "300px" : "60px"}
|
||||||
title={!collapsible ? "请选择服务区" : ""}
|
title={!collapsible ? "请选择会员等级" : ""}
|
||||||
headerBordered
|
headerBordered
|
||||||
collapsed={collapsible}
|
collapsed={collapsible}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -25,7 +25,7 @@ const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefin
|
|||||||
// 显示详情抽屉
|
// 显示详情抽屉
|
||||||
const [showDetailDrawer, setShowDetailDrawer] = useState<boolean>(false)
|
const [showDetailDrawer, setShowDetailDrawer] = useState<boolean>(false)
|
||||||
|
|
||||||
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj');
|
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObjIsAllOK');
|
||||||
let CONSUMPTIONRECORDTYPEObj = session.get('CONSUMPTIONRECORDTYPEObj')
|
let CONSUMPTIONRECORDTYPEObj = session.get('CONSUMPTIONRECORDTYPEObj')
|
||||||
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
||||||
// 当前查询的文字
|
// 当前查询的文字
|
||||||
@ -356,11 +356,24 @@ const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefin
|
|||||||
})
|
})
|
||||||
|
|
||||||
console.log('selectedIdselectedIdselectedId', selectedId);
|
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 = {
|
const req: any = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
MEMBERSHIP_LEVELS: selectedId,
|
MEMBERSHIP_LEVELS: selectedId,
|
||||||
MEMBERSHIP_STATE: params?.MEMBERSHIP_STATE,
|
MEMBERSHIP_STATE: 1000,
|
||||||
|
MEMBERSHIP_TYPES: params?.MEMBERSHIP_TYPE === '1' ? allType : params?.MEMBERSHIP_TYPE,
|
||||||
},
|
},
|
||||||
keyWord: {
|
keyWord: {
|
||||||
Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE,CERTIFICATE_NUMBER,MEMBERSHIP_CARD,MEMBERSHIP_ADDRESS,PLATE_NUMBER",
|
Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE,CERTIFICATE_NUMBER,MEMBERSHIP_CARD,MEMBERSHIP_ADDRESS,PLATE_NUMBER",
|
||||||
|
|||||||
@ -131,26 +131,26 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
dataIndex: 'FIELDENUM_STATUS',
|
// dataIndex: 'FIELDENUM_STATUS',
|
||||||
title: '有效状态',
|
// title: '有效状态',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 120,
|
// width: 120,
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
valueType: "select",
|
// valueType: "select",
|
||||||
// valueEnum: {
|
// // valueEnum: {
|
||||||
// "1": "有效",
|
// // "1": "有效",
|
||||||
// "0": "无效"
|
// // "0": "无效"
|
||||||
|
// // },
|
||||||
|
// hideInSearch: true,
|
||||||
|
// initialValue: "1",
|
||||||
|
// fieldProps: {
|
||||||
|
// options: [
|
||||||
|
// { label: '有效', value: "1" },
|
||||||
|
// { label: '无效', value: "0" }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
// },
|
// },
|
||||||
initialValue: "1",
|
|
||||||
fieldProps: {
|
|
||||||
options: [
|
|
||||||
{ label: '有效', value: "1" },
|
|
||||||
{ label: '无效', value: "0" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
dataIndex: 'FIELDENUM_DESC',
|
dataIndex: 'FIELDENUM_DESC',
|
||||||
title: '备注说明',
|
title: '备注说明',
|
||||||
@ -226,12 +226,14 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
req = {
|
req = {
|
||||||
...currentRow,
|
...currentRow,
|
||||||
...res,
|
...res,
|
||||||
|
FIELDENUM_STATUS: 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
...res,
|
...res,
|
||||||
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
|
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
|
||||||
FIELDENUM_PID: -1,
|
FIELDENUM_PID: -1,
|
||||||
|
FIELDENUM_STATUS: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const data = await handeSynchroFIELDENUM(req)
|
const data = await handeSynchroFIELDENUM(req)
|
||||||
@ -272,7 +274,7 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
FIELDEXPLAIN_FIELD: 'MEMBERSHIP_LEVEL_YN',
|
FIELDEXPLAIN_FIELD: 'MEMBERSHIP_LEVEL_YN',
|
||||||
FIELDEXPLAIN_ID: "",
|
FIELDEXPLAIN_ID: "",
|
||||||
FIELDENUM_PID: "",
|
FIELDENUM_PID: "",
|
||||||
FIELDENUM_STATUS: params?.FIELDENUM_STATUS,
|
FIELDENUM_STATUS: 1,
|
||||||
SearchKey: ""
|
SearchKey: ""
|
||||||
}
|
}
|
||||||
const data = await handeGetNestingFIELDENUMList(req);
|
const data = await handeGetNestingFIELDENUMList(req);
|
||||||
@ -503,7 +505,7 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="FIELDENUM_STATUS"
|
name="FIELDENUM_STATUS"
|
||||||
label="有效状态"
|
label="有效状态"
|
||||||
@ -515,7 +517,7 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col> */}
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormTextArea
|
<ProFormTextArea
|
||||||
name="FIELDENUM_DESC"
|
name="FIELDENUM_DESC"
|
||||||
|
|||||||
@ -359,13 +359,14 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined
|
|||||||
if (typeTab <= 3) {
|
if (typeTab <= 3) {
|
||||||
req = {
|
req = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
MEMBERSHIP_TYPE: currentTabValue || "",
|
MEMBERSHIP_LEVEL: currentTabValue || "",
|
||||||
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
OPERATE_DATE_Start: searchParams?.StartDate || "",
|
OPERATE_DATE_Start: searchParams?.StartDate || "",
|
||||||
OPERATE_DATE_End: searchParams?.EndDate || "",
|
OPERATE_DATE_End: searchParams?.EndDate || "",
|
||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
POINT_TYPE: typeTab === 1 ? '' : typeTab === 2 ? '1' : typeTab === 3 ? '-1' : '',
|
POINT_TYPE: typeTab === 1 ? '' : typeTab === 2 ? '1' : typeTab === 3 ? '-1' : '',
|
||||||
POINT_SOURCE: ''
|
POINT_SOURCE: '',
|
||||||
|
MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET
|
||||||
},
|
},
|
||||||
keyWord: {
|
keyWord: {
|
||||||
Key: "MEMBERSHIP_NAME",
|
Key: "MEMBERSHIP_NAME",
|
||||||
@ -384,7 +385,8 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined
|
|||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
SCORESETTING_STATE: 1,
|
SCORESETTING_STATE: 1,
|
||||||
GROWTH_SOURCES: "",
|
GROWTH_SOURCES: "",
|
||||||
GROWTH_TYPE: typeTab === 4 ? '' : typeTab === 5 ? '1' : typeTab === 6 ? '-1' : ''
|
GROWTH_TYPE: typeTab === 4 ? '' : typeTab === 5 ? '1' : typeTab === 6 ? '-1' : '',
|
||||||
|
MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET
|
||||||
},
|
},
|
||||||
PageIndex: searchParams?.current,
|
PageIndex: searchParams?.current,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
@ -462,7 +464,8 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined
|
|||||||
handleGetTopData(StartDate, EndDate, values.MEMBERSHIP_TARGET)
|
handleGetTopData(StartDate, EndDate, values.MEMBERSHIP_TARGET)
|
||||||
setSearchParams({
|
setSearchParams({
|
||||||
StartDate: StartDate,
|
StartDate: StartDate,
|
||||||
EndDate: EndDate
|
EndDate: EndDate,
|
||||||
|
MEMBERSHIP_TARGET: values.MEMBERSHIP_TARGET && values.MEMBERSHIP_TARGET.length > 0 ? values.MEMBERSHIP_TARGET.toString() : ""
|
||||||
})
|
})
|
||||||
actionRef.current?.reload()
|
actionRef.current?.reload()
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -452,7 +452,8 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined
|
|||||||
OPERATE_DATE_End: searchParams?.EndDate || "",
|
OPERATE_DATE_End: searchParams?.EndDate || "",
|
||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
POINT_TYPE: typeTab === 1 ? '' : typeTab === 2 ? '1' : typeTab === 3 ? '-1' : '',
|
POINT_TYPE: typeTab === 1 ? '' : typeTab === 2 ? '1' : typeTab === 3 ? '-1' : '',
|
||||||
POINT_SOURCE: ''
|
POINT_SOURCE: '',
|
||||||
|
MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET || ""
|
||||||
},
|
},
|
||||||
keyWord: {
|
keyWord: {
|
||||||
Key: "MEMBERSHIP_NAME",
|
Key: "MEMBERSHIP_NAME",
|
||||||
@ -471,7 +472,8 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined
|
|||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
SCORESETTING_STATE: 1,
|
SCORESETTING_STATE: 1,
|
||||||
GROWTH_SOURCES: "",
|
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: {
|
keyWord: {
|
||||||
Key: "MEMBERSHIP_NAME",
|
Key: "MEMBERSHIP_NAME",
|
||||||
@ -548,7 +550,8 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined
|
|||||||
handleGetTopData(StartDate, EndDate, values.MEMBERSHIP_TARGET)
|
handleGetTopData(StartDate, EndDate, values.MEMBERSHIP_TARGET)
|
||||||
setSearchParams({
|
setSearchParams({
|
||||||
StartDate: StartDate,
|
StartDate: StartDate,
|
||||||
EndDate: EndDate
|
EndDate: EndDate,
|
||||||
|
MEMBERSHIP_TARGET: values.MEMBERSHIP_TARGET && values.MEMBERSHIP_TARGET.length > 0 ? values.MEMBERSHIP_TARGET.toString() : ""
|
||||||
})
|
})
|
||||||
actionRef.current?.reload()
|
actionRef.current?.reload()
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -332,6 +332,7 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent
|
|||||||
COMMENT_ISVALID: 1,
|
COMMENT_ISVALID: 1,
|
||||||
CREATE_DATE_Start: params?.CREATE_DATE_Start || "",
|
CREATE_DATE_Start: params?.CREATE_DATE_Start || "",
|
||||||
CREATE_DATE_End: params?.CREATE_DATE_End || "",
|
CREATE_DATE_End: params?.CREATE_DATE_End || "",
|
||||||
|
SERVERPART_IDS: selectedId,
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
|
|||||||
@ -133,25 +133,25 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
dataIndex: 'FIELDENUM_STATUS',
|
// dataIndex: 'FIELDENUM_STATUS',
|
||||||
title: '有效状态',
|
// title: '有效状态',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 120,
|
// width: 120,
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
valueType: "select",
|
// valueType: "select",
|
||||||
fieldProps: {
|
// fieldProps: {
|
||||||
options: [
|
// options: [
|
||||||
{ label: '有效', value: "1" },
|
// { label: '有效', value: "1" },
|
||||||
{ label: '无效', value: "0" }
|
// { label: '无效', value: "0" }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
// valueEnum: {
|
// // valueEnum: {
|
||||||
// "1": "有效",
|
// // "1": "有效",
|
||||||
// "0": "无效"
|
// // "0": "无效"
|
||||||
|
// // },
|
||||||
|
// initialValue: "1"
|
||||||
// },
|
// },
|
||||||
initialValue: "1"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
dataIndex: 'FIELDENUM_DESC',
|
dataIndex: 'FIELDENUM_DESC',
|
||||||
title: '备注说明',
|
title: '备注说明',
|
||||||
@ -227,17 +227,20 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
req = {
|
req = {
|
||||||
...currentRow,
|
...currentRow,
|
||||||
...res,
|
...res,
|
||||||
|
FIELDENUM_STATUS: 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
...res,
|
...res,
|
||||||
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
|
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
|
||||||
FIELDENUM_PID: -1,
|
FIELDENUM_PID: -1,
|
||||||
|
FIELDENUM_STATUS: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('reqfdshfasjjl', req);
|
console.log('reqfdshfasjjl', req);
|
||||||
|
|
||||||
const data = await handeSynchroFIELDENUMNoEncryption(req)
|
const data = await handeSynchroFIELDENUMNoEncryption(req)
|
||||||
|
console.log('datadatadata', data);
|
||||||
handleConfirmLoading(false)
|
handleConfirmLoading(false)
|
||||||
if (data.Result_Code === 100) {
|
if (data.Result_Code === 100) {
|
||||||
handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}【${data.Result_Data.FIELDENUM_NAME}】`)
|
handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}【${data.Result_Data.FIELDENUM_NAME}】`)
|
||||||
@ -266,6 +269,21 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
setTableData(data)
|
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 (
|
return (
|
||||||
<PageContainer header={{
|
<PageContainer header={{
|
||||||
title: '',
|
title: '',
|
||||||
@ -288,7 +306,7 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
FIELDEXPLAIN_FIELD: 'BEHAVIORRECORD_TYPE',
|
FIELDEXPLAIN_FIELD: 'BEHAVIORRECORD_TYPE',
|
||||||
FIELDEXPLAIN_ID: "",
|
FIELDEXPLAIN_ID: "",
|
||||||
FIELDENUM_PID: "",
|
FIELDENUM_PID: "",
|
||||||
FIELDENUM_STATUS: params?.FIELDENUM_STATUS,
|
FIELDENUM_STATUS: 1,
|
||||||
SearchKey: ""
|
SearchKey: ""
|
||||||
}
|
}
|
||||||
const data = await handeGetNestingFIELDENUMListNoEncryption(req);
|
const data = await handeGetNestingFIELDENUMListNoEncryption(req);
|
||||||
@ -296,7 +314,8 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
console.log('datadatadatadatadata', data);
|
console.log('datadatadatadatadata', data);
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
setTypeTreeData(data)
|
setTypeTreeData(data)
|
||||||
handleGetAllTypeData()
|
// handleGetAllTypeData()
|
||||||
|
setTableData(data)
|
||||||
return { data: data, success: true, total: data.length }
|
return { data: data, success: true, total: data.length }
|
||||||
}
|
}
|
||||||
return { data: [], success: true }
|
return { data: [], success: true }
|
||||||
@ -446,35 +465,17 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
name="FIELDENUM_PID"
|
name="FIELDENUM_PID"
|
||||||
label="上级类别"
|
label="上级类别"
|
||||||
request={async () => {
|
request={async () => {
|
||||||
|
let res: any = markDisabled(tableData, currentRow?.FIELDENUM_ID ? [currentRow?.FIELDENUM_ID] : "")
|
||||||
|
console.log('resresresres', res);
|
||||||
|
|
||||||
let list: any = [{
|
let list: any = [{
|
||||||
FIELDENUM_NAME: "默认类别",
|
FIELDENUM_NAME: "默认类别",
|
||||||
FIELDENUM_ID: -1,
|
FIELDENUM_ID: -1,
|
||||||
children: tableData
|
children: res
|
||||||
}]
|
}]
|
||||||
return list
|
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={{
|
fieldProps={{
|
||||||
// treeData: tableData,
|
|
||||||
fieldNames: {
|
fieldNames: {
|
||||||
label: 'FIELDENUM_NAME',
|
label: 'FIELDENUM_NAME',
|
||||||
value: 'FIELDENUM_ID',
|
value: 'FIELDENUM_ID',
|
||||||
@ -529,7 +530,7 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="FIELDENUM_STATUS"
|
name="FIELDENUM_STATUS"
|
||||||
label="有效状态"
|
label="有效状态"
|
||||||
@ -541,7 +542,7 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col> */}
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormTextArea
|
<ProFormTextArea
|
||||||
name="FIELDENUM_DESC"
|
name="FIELDENUM_DESC"
|
||||||
|
|||||||
@ -143,7 +143,7 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
|
|||||||
AUTOTYPE_TYPEID: '2000',
|
AUTOTYPE_TYPEID: '2000',
|
||||||
AUTOTYPE_PID: "",
|
AUTOTYPE_PID: "",
|
||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
AUTOTYPE_VALID: 1,
|
AUTOTYPE_VALID: "",
|
||||||
SearchKey: ""
|
SearchKey: ""
|
||||||
}
|
}
|
||||||
const data = await handeGetNestingAUTOTYPEList(req);
|
const data = await handeGetNestingAUTOTYPEList(req);
|
||||||
@ -335,7 +335,7 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
|
|||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
MEMBERSHIP_IDS: parentDetail?.MEMBERSHIP_ID,
|
MEMBERSHIP_IDS: parentDetail?.MEMBERSHIP_ID,
|
||||||
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,
|
PageIndex: params?.current,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
@ -349,7 +349,7 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
|
|||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
POINT_TYPE: params?.POINT_TYPE === '0' ? '' : params?.POINT_TYPE,
|
POINT_TYPE: params?.POINT_TYPE === '0' ? '' : params?.POINT_TYPE,
|
||||||
POINT_SOURCE: params?.POINT_SOURCE === '0' ? '' : params?.POINT_SOURCE,
|
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,
|
PageIndex: params?.current,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
|
|||||||
@ -132,25 +132,25 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
dataIndex: 'FIELDENUM_STATUS',
|
// dataIndex: 'FIELDENUM_STATUS',
|
||||||
title: '有效状态',
|
// title: '有效状态',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 120,
|
// width: 120,
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
valueType: "select",
|
// valueType: "select",
|
||||||
// valueEnum: {
|
// // valueEnum: {
|
||||||
// "1": "有效",
|
// // "1": "有效",
|
||||||
// "0": "无效"
|
// // "0": "无效"
|
||||||
|
// // },
|
||||||
|
// initialValue: "1",
|
||||||
|
// fieldProps: {
|
||||||
|
// options: [
|
||||||
|
// { label: '有效', value: "1" },
|
||||||
|
// { label: '无效', value: "0" }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
// },
|
// },
|
||||||
initialValue: "1",
|
|
||||||
fieldProps: {
|
|
||||||
options: [
|
|
||||||
{ label: '有效', value: "1" },
|
|
||||||
{ label: '无效', value: "0" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
dataIndex: 'FIELDENUM_DESC',
|
dataIndex: 'FIELDENUM_DESC',
|
||||||
title: '备注说明',
|
title: '备注说明',
|
||||||
@ -226,12 +226,14 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
req = {
|
req = {
|
||||||
...currentRow,
|
...currentRow,
|
||||||
...res,
|
...res,
|
||||||
|
FIELDENUM_STATUS: 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
...res,
|
...res,
|
||||||
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
|
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
|
||||||
FIELDENUM_PID: -1,
|
FIELDENUM_PID: -1,
|
||||||
|
FIELDENUM_STATUS: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const data = await handeSynchroFIELDENUM(req)
|
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 (
|
return (
|
||||||
<PageContainer header={{
|
<PageContainer header={{
|
||||||
title: '',
|
title: '',
|
||||||
@ -273,7 +291,7 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
FIELDEXPLAIN_FIELD: 'POINT_TYPE',
|
FIELDEXPLAIN_FIELD: 'POINT_TYPE',
|
||||||
FIELDEXPLAIN_ID: "",
|
FIELDEXPLAIN_ID: "",
|
||||||
FIELDENUM_PID: "",
|
FIELDENUM_PID: "",
|
||||||
FIELDENUM_STATUS: params?.FIELDENUM_STATUS,
|
FIELDENUM_STATUS: 1,
|
||||||
SearchKey: ""
|
SearchKey: ""
|
||||||
}
|
}
|
||||||
const data = await handeGetNestingFIELDENUMList(req);
|
const data = await handeGetNestingFIELDENUMList(req);
|
||||||
@ -286,8 +304,8 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
const obj: any = {}
|
const obj: any = {}
|
||||||
const list: any = []
|
const list: any = []
|
||||||
data.forEach((item: any) => {
|
data.forEach((item: any) => {
|
||||||
list.push({ label: item.label, value: item.value })
|
list.push({ label: item.FIELDENUM_NAME, value: item.FIELDENUM_VALUE })
|
||||||
obj[item.value] = item.label
|
obj[item.FIELDENUM_VALUE] = item.FIELDENUM_NAME
|
||||||
})
|
})
|
||||||
session.set('SCORETYPEList', list);
|
session.set('SCORETYPEList', list);
|
||||||
session.set('SCORETYPEObj', obj);
|
session.set('SCORETYPEObj', obj);
|
||||||
@ -441,9 +459,15 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
name="FIELDENUM_PID"
|
name="FIELDENUM_PID"
|
||||||
label="上级类别"
|
label="上级类别"
|
||||||
request={async () => {
|
request={async () => {
|
||||||
|
console.log('typeTreeDatatypeTreeData', typeTreeData);
|
||||||
|
console.log('currentRowcurrentRowcurrentRow', currentRow);
|
||||||
if (typeTreeData && typeTreeData.length > 0) {
|
if (typeTreeData && typeTreeData.length > 0) {
|
||||||
let list: any = [{ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }, ...typeTreeData]
|
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 {
|
} else {
|
||||||
const req = {
|
const req = {
|
||||||
FIELDEXPLAIN_FIELD: 'POINT_TYPE',
|
FIELDEXPLAIN_FIELD: 'POINT_TYPE',
|
||||||
@ -454,9 +478,12 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
}
|
}
|
||||||
const data = await handeGetNestingFIELDENUMList(req);
|
const data = await handeGetNestingFIELDENUMList(req);
|
||||||
if (data && data.length > 0) {
|
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)
|
setTypeTreeData(data)
|
||||||
return data
|
return res
|
||||||
} else {
|
} else {
|
||||||
return [{ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }]
|
return [{ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }]
|
||||||
}
|
}
|
||||||
@ -509,16 +536,16 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormDigit
|
<ProFormDigit
|
||||||
name="FIELDENUM_VALUE"
|
name="FIELDENUM_VALUE"
|
||||||
label="售后枚举"
|
label="积分枚举"
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入售后枚举"
|
message: "请输入积分枚举"
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="FIELDENUM_STATUS"
|
name="FIELDENUM_STATUS"
|
||||||
label="有效状态"
|
label="有效状态"
|
||||||
@ -530,7 +557,7 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col> */}
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormTextArea
|
<ProFormTextArea
|
||||||
name="FIELDENUM_DESC"
|
name="FIELDENUM_DESC"
|
||||||
|
|||||||
@ -48,8 +48,8 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
let SCORETYPETree = session.get('SCORETYPETree')
|
let SCORETYPETree = session.get('SCORETYPETree')
|
||||||
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
||||||
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
||||||
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList')
|
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNListIsAllOK')
|
||||||
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj')
|
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObjIsAllOK')
|
||||||
|
|
||||||
// 表格数据
|
// 表格数据
|
||||||
const [tableData, setTableData] = useState<any>()
|
const [tableData, setTableData] = useState<any>()
|
||||||
@ -92,12 +92,12 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
return SCORETYPETree
|
return SCORETYPETree
|
||||||
},
|
},
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return record?.SCORE_TYPE && SCORETYPEObj && SCORETYPEObj[record?.SCORE_TYPE] ? <a onClick={() => {
|
return <a onClick={() => {
|
||||||
setCurrentRow({ ...record });
|
setCurrentRow({ ...record });
|
||||||
handleModalVisible(true);
|
handleModalVisible(true);
|
||||||
}}>
|
}}>
|
||||||
{SCORETYPEObj[record?.SCORE_TYPE]}
|
{record?.SCORE_TYPE && SCORETYPEObj && SCORETYPEObj[record?.SCORE_TYPE] ? SCORETYPEObj[record?.SCORE_TYPE] : "-"}
|
||||||
</a> : "-"
|
</a>
|
||||||
}
|
}
|
||||||
// valueEnum: SCORETYPEObj
|
// valueEnum: SCORETYPEObj
|
||||||
},
|
},
|
||||||
@ -210,25 +210,25 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
// align: 'center',
|
// align: 'center',
|
||||||
// hideInSearch: true,
|
// hideInSearch: true,
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
dataIndex: 'SCORESETTING_STATE',
|
// dataIndex: 'SCORESETTING_STATE',
|
||||||
title: '有效状态',
|
// title: '有效状态',
|
||||||
width: 120,
|
// width: 120,
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
valueType: 'select',
|
// valueType: 'select',
|
||||||
// valueEnum: {
|
// // valueEnum: {
|
||||||
// "1": "有效",
|
// // "1": "有效",
|
||||||
// "0": "无效"
|
// // "0": "无效"
|
||||||
|
// // },
|
||||||
|
// fieldProps: {
|
||||||
|
// options: [
|
||||||
|
// { label: '有效', value: "1" },
|
||||||
|
// { label: '无效', value: "0" }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// initialValue: "1",
|
||||||
|
// hideInTable: true
|
||||||
// },
|
// },
|
||||||
fieldProps: {
|
|
||||||
options: [
|
|
||||||
{ label: '有效', value: "1" },
|
|
||||||
{ label: '无效', value: "0" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
initialValue: "1",
|
|
||||||
hideInTable: true
|
|
||||||
},
|
|
||||||
// {
|
// {
|
||||||
// dataIndex: 'OPERATE_DATE',
|
// dataIndex: 'OPERATE_DATE',
|
||||||
// title: '操作时间',
|
// title: '操作时间',
|
||||||
@ -387,14 +387,16 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
...req,
|
...req,
|
||||||
...newValue,
|
...newValue,
|
||||||
MEMBERSHIP_TYPE: item.value,
|
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] : "-"}】`)
|
reqListUpdateMsg.push(`${item.label}的${subItem.label}【${SCORETYPEObj && SCORETYPEObj[newValue.SCORE_TYPE] ? SCORETYPEObj[newValue.SCORE_TYPE] : "-"}】`)
|
||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
...newValue,
|
...newValue,
|
||||||
MEMBERSHIP_TYPE: item.value,
|
MEMBERSHIP_TYPE: item.value,
|
||||||
MEMBERSHIP_LEVEL: subItem.value
|
MEMBERSHIP_LEVEL: subItem.value,
|
||||||
|
SCORESETTING_STATE: 1,
|
||||||
}
|
}
|
||||||
reqList.push(req)
|
reqList.push(req)
|
||||||
reqListAddMsg.push(`${item.label}的${subItem.label}【${SCORETYPEObj && SCORETYPEObj[newValue.SCORE_TYPE] ? SCORETYPEObj[newValue.SCORE_TYPE] : "-"}】`)
|
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 || "",
|
SCORE_TYPES: params?.SCORE_TYPE || "",
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
SCORESETTING_STATE: params?.SCORESETTING_STATE,
|
SCORESETTING_STATE: 1,
|
||||||
MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === '1' ? '' : params?.MEMBERSHIP_TYPE || "",
|
MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === '1' ? '' : params?.MEMBERSHIP_TYPE || "",
|
||||||
MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL === '1' ? '' : params?.MEMBERSHIP_LEVEL || "",
|
MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL === '1' ? '' : params?.MEMBERSHIP_LEVEL || "",
|
||||||
},
|
},
|
||||||
@ -802,16 +804,6 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
// options={MEMBERSHIPTYPEYNList}
|
// options={MEMBERSHIPTYPEYNList}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
|
||||||
<ProFormSelect
|
|
||||||
name="SCORESETTING_STATE"
|
|
||||||
label="有效状态"
|
|
||||||
options={[
|
|
||||||
{ label: '有效', value: 1 },
|
|
||||||
{ label: '无效', value: 0 },
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="EXCHANGE_BASE"
|
name="EXCHANGE_BASE"
|
||||||
|
|||||||
@ -854,6 +854,7 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
|||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
|
SortStr: "OPERATE_DATE desc"
|
||||||
}
|
}
|
||||||
const data = await handeGetCOMMODITYList(req);
|
const data = await handeGetCOMMODITYList(req);
|
||||||
setCurrentSearchText(params?.searchText || "")
|
setCurrentSearchText(params?.searchText || "")
|
||||||
|
|||||||
@ -142,24 +142,24 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
|||||||
width: 150,
|
width: 150,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
dataIndex: 'USERDEFINEDTYPE_STATE',
|
// dataIndex: 'USERDEFINEDTYPE_STATE',
|
||||||
title: '有效状态',
|
// title: '有效状态',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 150,
|
// width: 150,
|
||||||
valueType: 'select',
|
// valueType: 'select',
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
fieldProps: {
|
// fieldProps: {
|
||||||
options: [
|
// options: [
|
||||||
{ label: '有效', value: "1" },
|
// { label: '有效', value: "1" },
|
||||||
{ label: '无效', value: "0" }
|
// { label: '无效', value: "0" }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
initialValue: "1",
|
// initialValue: "1",
|
||||||
render: (_, record) => {
|
// render: (_, record) => {
|
||||||
return record?.COMMODITY_STATE === 1 || record?.USERDEFINEDTYPE_STATE === 1 ? '有效' : '无效'
|
// return record?.COMMODITY_STATE === 1 || record?.USERDEFINEDTYPE_STATE === 1 ? '有效' : '无效'
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
dataIndex: 'USERDEFINEDTYPE_DESC',
|
dataIndex: 'USERDEFINEDTYPE_DESC',
|
||||||
@ -293,6 +293,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
|||||||
STAFF_ID: currentUser?.ID,
|
STAFF_ID: currentUser?.ID,
|
||||||
STAFF_NAME: currentUser?.Name,
|
STAFF_NAME: currentUser?.Name,
|
||||||
USERDEFINEDTYPE_ICO: fileList && fileList.length > 0 ? fileList[0].url : "",
|
USERDEFINEDTYPE_ICO: fileList && fileList.length > 0 ? fileList[0].url : "",
|
||||||
|
USERDEFINEDTYPE_STATE: 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
@ -305,6 +306,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
|||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
USERDEFINEDTYPE_ICO: fileList && fileList.length > 0 ? fileList[0].url : "",
|
USERDEFINEDTYPE_ICO: fileList && fileList.length > 0 ? fileList[0].url : "",
|
||||||
|
USERDEFINEDTYPE_STATE: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('reqreqreqreq', req);
|
console.log('reqreqreqreq', req);
|
||||||
@ -333,7 +335,8 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
|||||||
...res,
|
...res,
|
||||||
OPERATE_TIME: moment().format('YYYY-MM-DD HH:mm:ss'),
|
OPERATE_TIME: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
STAFF_ID: currentUser?.ID,
|
STAFF_ID: currentUser?.ID,
|
||||||
STAFF_NAME: currentUser?.Name
|
STAFF_NAME: currentUser?.Name,
|
||||||
|
USERDEFINEDTYPE_STATE: 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
@ -341,7 +344,8 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
|||||||
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
STAFF_ID: currentUser?.ID,
|
STAFF_ID: currentUser?.ID,
|
||||||
STAFF_NAME: currentUser?.Name,
|
STAFF_NAME: currentUser?.Name,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
|
USERDEFINEDTYPE_STATE: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('reqreqreqreq', req);
|
console.log('reqreqreqreq', req);
|
||||||
@ -414,7 +418,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
|||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
PROVINCE_CODE: "",
|
PROVINCE_CODE: "",
|
||||||
GOODSTYPE: 6000,
|
GOODSTYPE: 6000,
|
||||||
USERDEFINEDTYPE_STATE: params?.USERDEFINEDTYPE_STATE,
|
USERDEFINEDTYPE_STATE: 1,
|
||||||
SearchKey: params?.searchText || "",
|
SearchKey: params?.searchText || "",
|
||||||
MERCHANTS_ID: currentUser?.SupplierID
|
MERCHANTS_ID: currentUser?.SupplierID
|
||||||
}
|
}
|
||||||
@ -425,9 +429,10 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
|||||||
handleSetlogSave(`点击查询按钮`)
|
handleSetlogSave(`点击查询按钮`)
|
||||||
setCurrentSearchText(params?.searchText || "")
|
setCurrentSearchText(params?.searchText || "")
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
let list: any = transformMultiRuleToChildren(data)
|
console.log('datadatadata', JSON.parse(JSON.stringify(data)));
|
||||||
console.log('listlistlistlist', list);
|
// let list: any = transformMultiRuleToChildren(data)
|
||||||
return { data: list, success: true, total: data.length }
|
// console.log('listlistlistlist', list);
|
||||||
|
return { data: data, success: true, total: data.length }
|
||||||
}
|
}
|
||||||
return { data: [], success: true }
|
return { data: [], success: true }
|
||||||
}}
|
}}
|
||||||
@ -538,6 +543,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
|||||||
footer={
|
footer={
|
||||||
<ModalFooter
|
<ModalFooter
|
||||||
hideDelete={!currentRow?.USERDEFINEDTYPE_ID}
|
hideDelete={!currentRow?.USERDEFINEDTYPE_ID}
|
||||||
|
confirmLoading={confirmLoading}
|
||||||
handleDelete={async () => {
|
handleDelete={async () => {
|
||||||
if (currentRow?.COMMODITY_MULTI_ID) {
|
if (currentRow?.COMMODITY_MULTI_ID) {
|
||||||
await handelDeleteSpecifications(currentRow.COMMODITY_MULTI_ID);
|
await handelDeleteSpecifications(currentRow.COMMODITY_MULTI_ID);
|
||||||
@ -667,13 +673,13 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
|||||||
label="类别索引"
|
label="类别索引"
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="USERDEFINEDTYPE_STATE"
|
name="USERDEFINEDTYPE_STATE"
|
||||||
label="有效状态"
|
label="有效状态"
|
||||||
options={[{ label: "有效", value: 1 }, { label: "无效", value: 0 }]}
|
options={[{ label: "有效", value: 1 }, { label: "无效", value: 0 }]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col> */}
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="STAFF_NAME"
|
name="STAFF_NAME"
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import ProTable from "@ant-design/pro-table";
|
|||||||
import ReactHTMLTableToExcel from "react-html-table-to-excel";
|
import ReactHTMLTableToExcel from "react-html-table-to-excel";
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import PageTitleBox from "@/components/PageTitleBox";
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
import { handleGetBEHAVIORRECORDList } from "@/pages/Setting/OperationLog/service";
|
import { handleGetBEHAVIORRECORDList, handleGetBEHAVIORRECORDListCloud } from "@/pages/Setting/OperationLog/service";
|
||||||
import MemberDetail from "../memberInfor/component/memberDetail";
|
import MemberDetail from "../memberInfor/component/memberDetail";
|
||||||
import { handleSetlogSave } from "@/utils/format";
|
import { handleSetlogSave } from "@/utils/format";
|
||||||
import { handeGetNestingFIELDENUMListNoEncryption } from "../service";
|
import { handeGetNestingFIELDENUMListNoEncryption } from "../service";
|
||||||
@ -512,12 +512,22 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
|
|||||||
Key: 'BEHAVIORRECORD_ROUTNAME,USER_NAME,VISIT_CHANNELS,BEHAVIORRECORD_PREROUT',
|
Key: 'BEHAVIORRECORD_ROUTNAME,USER_NAME,VISIT_CHANNELS,BEHAVIORRECORD_PREROUT',
|
||||||
Value: params?.searchValue || ''
|
Value: params?.searchValue || ''
|
||||||
},
|
},
|
||||||
PageIndex: params?.current || 1,
|
PageIndex: 1,
|
||||||
PageSize: params?.pageSize || 999999
|
PageSize: 999999
|
||||||
}
|
}
|
||||||
|
|
||||||
setSearchParams(params)
|
setSearchParams(params)
|
||||||
const data = await handleGetBEHAVIORRECORDList(req)
|
let data = []
|
||||||
|
if (isComponent) {
|
||||||
|
data = await handleGetBEHAVIORRECORDList(req)
|
||||||
|
} else {
|
||||||
|
if (params?.SOURCE_PLATFORM === '出行平台') {
|
||||||
|
data = await handleGetBEHAVIORRECORDList(req)
|
||||||
|
} else if (params?.SOURCE_PLATFORM === '彩云驿出行') {
|
||||||
|
data = await handleGetBEHAVIORRECORDListCloud(req)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
setCurrentSearchText(params?.searchValue || "")
|
setCurrentSearchText(params?.searchValue || "")
|
||||||
|
|
||||||
|
|||||||
@ -38,8 +38,8 @@ const RegistrationStatistics: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
|
|
||||||
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
||||||
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
||||||
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj')
|
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObjIsAllOK')
|
||||||
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList')
|
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNListIsAllOK')
|
||||||
|
|
||||||
// 是否排除测试会员
|
// 是否排除测试会员
|
||||||
const [ExcludeTest, setExcludeTest] = useState<boolean>(true)
|
const [ExcludeTest, setExcludeTest] = useState<boolean>(true)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { connect } from "umi";
|
import { connect } from "umi";
|
||||||
import type { ConnectState } from "@/models/connect";
|
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 { useRef, useState } from "react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Draggable from "react-draggable";
|
import Draggable from "react-draggable";
|
||||||
@ -377,6 +377,7 @@ const SharedRestStationDetail = ({ parentRow, setParentRow, onShow, setOnShow, r
|
|||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
label={"所属服务区"}
|
label={"所属服务区"}
|
||||||
name={"SERVERPART_ID"}
|
name={"SERVERPART_ID"}
|
||||||
|
rules={[{ required: true, message: '请选择所属服务区' }]}
|
||||||
fieldProps={{
|
fieldProps={{
|
||||||
options: serverpartList,
|
options: serverpartList,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
@ -605,6 +606,21 @@ const SharedRestStationDetail = ({ parentRow, setParentRow, onShow, setOnShow, r
|
|||||||
</ProForm>
|
</ProForm>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
|
|
||||||
|
{/* 图片预览组件 */}
|
||||||
|
{fileList && fileList.length > 0 && <div style={{ display: 'none' }}>
|
||||||
|
<Image.PreviewGroup
|
||||||
|
preview={{
|
||||||
|
visible: imagePreviewVisible,
|
||||||
|
onVisibleChange: vis => {
|
||||||
|
handleChangePreview(vis)
|
||||||
|
}
|
||||||
|
}}>
|
||||||
|
{
|
||||||
|
fileList.map((n) => <Image src={n.url} key={n.url} />)
|
||||||
|
}
|
||||||
|
</Image.PreviewGroup>
|
||||||
|
</div>}
|
||||||
<SharedRestStationOrderDetail bigParams={parentRow} onShow={orderModalVisible} setOnShow={handleOrderModalVisible} parentRow={currentRow} setParentRow={setCurrentRow} actionRef={tableRef} currentUser={currentUser} readonly={currentRow?.RESTSTATIONBILL_ID} />
|
<SharedRestStationOrderDetail bigParams={parentRow} onShow={orderModalVisible} setOnShow={handleOrderModalVisible} parentRow={currentRow} setParentRow={setCurrentRow} actionRef={tableRef} currentUser={currentUser} readonly={currentRow?.RESTSTATIONBILL_ID} />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -246,7 +246,7 @@ const SummaryOfIntegralGrowthValue: React.FC<{ currentUser: CurrentUser | undefi
|
|||||||
setShowDetail(false)
|
setShowDetail(false)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MemberInfor searchType={searchType} valueType={valueType} isComponent={true} noMemberType={searchType === 1} noMemberLevel={searchType === 2} ExcludeTest={ExcludeTest} />
|
<MemberInfor searchType={searchType} come={'SummaryOfIntegralGrowthValue'} valueType={valueType} isComponent={true} noMemberType={searchType === 1} noMemberLevel={searchType === 2} ExcludeTest={ExcludeTest} />
|
||||||
</Drawer>
|
</Drawer>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -113,6 +113,7 @@ const pushTemplate = ({ parentRow, currentUser }: DetailProps) => {
|
|||||||
const req: any = {
|
const req: any = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
WECHATPUBLICSIGN_ID: parentRow?.WECHATPUBLICSIGN_ID,
|
WECHATPUBLICSIGN_ID: parentRow?.WECHATPUBLICSIGN_ID,
|
||||||
|
PUSHMODULE_STATE: 1
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
|
|||||||
@ -345,7 +345,7 @@ const MemberDetail = ({ showDetailDrawer, currentRow, handleCloseModal, currentU
|
|||||||
const handleSaveLabelConfig = async () => {
|
const handleSaveLabelConfig = async () => {
|
||||||
const req: any = {
|
const req: any = {
|
||||||
...userDetailInfo,
|
...userDetailInfo,
|
||||||
MEMBERSHIP_TARGET: selectUserLabel
|
MEMBERSHIP_TARGET: selectUserLabel || "#"
|
||||||
}
|
}
|
||||||
const data = await handeGetSynchroMEMBERSHIP(req)
|
const data = await handeGetSynchroMEMBERSHIP(req)
|
||||||
if (data.Result_Code === 100) {
|
if (data.Result_Code === 100) {
|
||||||
|
|||||||
@ -52,7 +52,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
|
|||||||
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
|
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
|
||||||
|
|
||||||
|
|
||||||
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj');
|
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObjIsAllOK');
|
||||||
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList');
|
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList');
|
||||||
let MEMBERSHIP_LEVELList = session.get('MEMBERSHIP_LEVELList');
|
let MEMBERSHIP_LEVELList = session.get('MEMBERSHIP_LEVELList');
|
||||||
let COMPANY_STATEObj = session.get('COMPANY_STATEObj');
|
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', '')}` : ''
|
return value ? `${n} ${value.replace('end', '')}` : ''
|
||||||
})
|
})
|
||||||
console.log('sortstrsortstrsortstrsortstr', sortstr.toString());
|
console.log('sortstrsortstrsortstrsortstr', sortstr.toString());
|
||||||
|
console.log('isComponentisComponentisComponent', isComponent);
|
||||||
let req: any = {}
|
let req: any = {}
|
||||||
if (isComponent) {
|
if (isComponent && come !== 'SummaryOfIntegralGrowthValue') {
|
||||||
req = {
|
req = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
MEMBERSHIP_TYPE: searchType === 1 ? valueType : '',
|
MEMBERSHIP_TYPES: searchType === 1 ? valueType : params?.MEMBERSHIP_TYPE === "1" ? "" : params?.MEMBERSHIP_TYPE,
|
||||||
MEMBERSHIP_LEVEL: come === 'ActiveMemberStatistics' ? comeParams?.MEMBERSHIP_LEVEL || '' : searchType === 2 ? valueType : '',
|
MEMBERSHIP_LEVELS: come === 'ActiveMemberStatistics' ? comeParams?.MEMBERSHIP_LEVEL || '' : searchType === 2 ? valueType : '',
|
||||||
MEMBERSHIP_STATE: 1000,
|
MEMBERSHIP_STATES: 1000,
|
||||||
ACTIVE_DATE_Start: come === 'ActiveMemberStatistics' ? comeParams?.start || '' : '',
|
ACTIVE_DATE_Start: come === 'ActiveMemberStatistics' ? comeParams?.start || '' : '',
|
||||||
ACTIVE_DATE_End: come === 'ActiveMemberStatistics' ? comeParams?.end || '' : '',
|
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 || ''
|
ExcludeTest: ExcludeTest || ''
|
||||||
},
|
},
|
||||||
keyWord: {
|
keyWord: {
|
||||||
@ -803,10 +804,10 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
|
|||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === "1" ? "" : params?.MEMBERSHIP_TYPE,
|
MEMBERSHIP_TYPES: params?.MEMBERSHIP_TYPE === "1" ? "" : params?.MEMBERSHIP_TYPE,
|
||||||
MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL === "1" ? "" : params?.MEMBERSHIP_LEVEL,
|
MEMBERSHIP_LEVELS: params?.MEMBERSHIP_LEVEL === "1" ? "" : params?.MEMBERSHIP_LEVEL,
|
||||||
MEMBERSHIP_STATE: params?.MEMBERSHIP_STATE,
|
MEMBERSHIP_STATES: params?.MEMBERSHIP_STATE,
|
||||||
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() : ""
|
||||||
// PLATE_NUMBER: params?.MEMBERSHIP_NAME || ""
|
// PLATE_NUMBER: params?.MEMBERSHIP_NAME || ""
|
||||||
},
|
},
|
||||||
keyWord: {
|
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() : "",
|
// sortstr: sortstr.length ? sortstr.toString() === "MEMBERGROWTH_VALUE asc" || sortstr.toString() === "MEMBERGROWTH_VALUE desc" ? "" : sortstr.toString() : "",
|
||||||
// }
|
// }
|
||||||
setSearchParams(params)
|
setSearchParams(params)
|
||||||
|
console.log('paramsparamsparams', params);
|
||||||
|
|
||||||
handleSetlogSave(`查看了会员账户管理列表`)
|
handleSetlogSave(`查看了会员账户管理列表`)
|
||||||
|
console.log('reqreq', req);
|
||||||
|
|
||||||
const data = await handleGetMEMBERSHIPList(req)
|
const data = await handleGetMEMBERSHIPList(req)
|
||||||
setCurrentSearchText(params?.MEMBERSHIP_NAME || "")
|
setCurrentSearchText(params?.MEMBERSHIP_NAME || "")
|
||||||
|
|||||||
@ -707,7 +707,7 @@ export async function handeSynchroFIELDENUM(params: any) {
|
|||||||
data: { ...params, requestEncryption: true }
|
data: { ...params, requestEncryption: true }
|
||||||
})
|
})
|
||||||
if (data.Result_Code !== 100) {
|
if (data.Result_Code !== 100) {
|
||||||
return []
|
return data
|
||||||
}
|
}
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
@ -719,7 +719,7 @@ export async function handeSynchroFIELDENUMNoEncryption(params: any) {
|
|||||||
data: { ...params, requestEncryption: true }
|
data: { ...params, requestEncryption: true }
|
||||||
})
|
})
|
||||||
if (data.Result_Code !== 100) {
|
if (data.Result_Code !== 100) {
|
||||||
return []
|
return data
|
||||||
}
|
}
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { CurrentUser } from 'umi'
|
|||||||
import session from './session'
|
import session from './session'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import { synchroBehaviorRecord } from '@/services/user'
|
import { synchroBehaviorRecord } from '@/services/user'
|
||||||
|
import ExcelJS from 'exceljs';
|
||||||
|
|
||||||
export type TreeSelectModel = {
|
export type TreeSelectModel = {
|
||||||
value: number | string,
|
value: number | string,
|
||||||
@ -876,3 +877,598 @@ export function convertTreeFieldToNumber(tree: any[], key: string): any[] {
|
|||||||
return newNode;
|
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<string | number, { text?: string } | string>;
|
||||||
|
renderText?: (text: any, record: any, index: number) => any;
|
||||||
|
hideInTable?: boolean;
|
||||||
|
valueType?: 'index' | string;
|
||||||
|
align?: 'left' | 'center' | 'right';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** ========== 新增:拍平树形数据 ========== */
|
||||||
|
function flattenTree<T extends Record<string, any>>(
|
||||||
|
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<any>(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);
|
||||||
|
}
|
||||||
220
src/utils/requestCloud.ts
Normal file
220
src/utils/requestCloud.ts
Normal file
@ -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<number, string> = {
|
||||||
|
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;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
// 由 scripts/writeVersion.js 自动生成
|
// 由 scripts/writeVersion.js 自动生成
|
||||||
export const VERSION = "4.5.80";
|
export const VERSION = "4.5.83";
|
||||||
export const GIT_HASH = "8188ef3";
|
export const GIT_HASH = "a5e49cf";
|
||||||
export const BUILD_TIME = "2025-12-01T10:30:33.613Z";
|
export const BUILD_TIME = "2025-12-08T12:14:56.214Z";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user