Commit 44670edd authored by 前端-许佳敏's avatar 前端-许佳敏

fix: 修复字段错误

parent a1654b4c
......@@ -70,7 +70,7 @@ const RightContent: React.FC<{}> = (props) => {
const webSocketInit = useCallback(() => {
console.log(ws.current)
if (SOCKET_URL && /ws\:\/\//.test(SOCKET_URL) && (!ws.current || ws.current.readyState === 3) && userInfo) {
const url = `${SOCKET_URL}/report/websocket?memberId=${userInfo.memberId}&roleId=${userInfo.MemberManageRoleId}&token=${userInfo.token}&source=${99}`
const url = `${SOCKET_URL}/report/websocket?memberId=${userInfo.memberId}&roleId=${userInfo.memberId}&token=${userInfo.token}&source=${99}`
ws.current = new WebSocket(url);
ws.current.onopen = (e) => {
console.log(e)
......
......@@ -27,7 +27,7 @@ const MemberSystem: React.FC<{}> = () => {
const deleteItem = async (record) => {
// 删除该项
await PublicApi.postMemberManageRoleDelete({
MemberManageRoleId: record.id
memberRoleId: record.id
})
ref.current.reload()
}
......
......@@ -71,7 +71,7 @@ const MemberDetail: React.FC<{}> = () => {
const fetchRoleMenuDetail = async (id) => {
// 10秒缓存
const res = await PublicApi.getMemberManageRoleGet({
MemberManageRoleId: id
memberRoleId: id
}, { useCache: true, ttl: 10 * 1000 })
return res
}
......@@ -108,7 +108,7 @@ const MemberDetail: React.FC<{}> = () => {
if (pageStatus === PageStatus.EDIT) {
await PublicApi.postMemberManageRoleUpdate({
...values,
MemberManageRoleId: id,
memberRoleId: id,
menuIds
})
} else {
......
......@@ -125,7 +125,7 @@ const AccountLists: React.FC<{}> = () => {
return {
memberType: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
MemberManageRoleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
memberRoleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
memberLevel: levels.map(item => ({ label: item.levelTag, value: item.level })),
}
}
......@@ -169,7 +169,7 @@ const AccountLists: React.FC<{}> = () => {
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberType', 'MemberManageRoleId', 'memberLevel'],
['memberType', 'memberRoleId', 'memberLevel'],
fetchSelectOptions,
);
}}
......
......@@ -48,7 +48,7 @@ export const searchSchema: ISchema = {
}
}
},
MemberManageRoleId: {
memberRoleId: {
type: 'string',
enum: [],
"x-component-props": {
......
......@@ -43,7 +43,7 @@ const CheckDetail: React.FC<{}> = () => {
if(code === 1000) {
let bankRes: any = await PublicApi.getSettleAccountsGetMemberAccountConfig({
memberId: data.memberId,
roleId: data.MemberManageRoleId,
roleId: data.memberRoleId,
})
setBankDetail(bankRes.data)
}
......
......@@ -50,7 +50,7 @@ const PaymentDetail: React.FC<{}> = () => {
if(code === 1000) {
let bankRes: any = await PublicApi.getSettleAccountsGetMemberAccountConfig({
memberId: data.memberId,
roleId: data.MemberManageRoleId,
roleId: data.memberRoleId,
})
setBankDetail(bankRes.data)
}
......
......@@ -300,7 +300,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = (props) => {
return await Promise.all(asyncData.filter(v => v.memberPrice === undefined).map(async v => {
const {code, data} = await PublicApi.getMemberManageUpperCreditParamGet({
parentMemberId: v.memberId,
parentMemberManageRoleId: v.MemberManageRoleId
parentMemberRoleId: v.memberRoleId
}, {ttl: 60 * 1000, useCache: true})
return code === 1000 ? { value: (data.parameter * 100) + '%', id: v.id } : { value: '', id: 0 }
}
......
......@@ -23,7 +23,7 @@ const asyncPadDataForProduct = async (ctx: ISchemaFormActions | ISchemaFormAsync
const asyncPriceRequests: any[] = await Promise.all(productData.filter(v => v.memberPrice === undefined).map(async v => {
const {code, data} = await PublicApi.getMemberManageUpperCreditParamGet({
parentMemberId: v.memberId,
parentMemberManageRoleId: v.MemberManageRoleId
parentMemberRoleId: v.memberRoleId
}, {ttl: 60 * 1000, useCache: true})
return code === 1000 ? { value: (data.parameter * 100) + '%', id: v.id } : { value: '', id: 0 }
}
......
......@@ -47,7 +47,7 @@ const Balance: React.FC<BalanceProps> = ({
setLoading(true);
PublicApi.getPayAssetAccountGetChildUserBalance({
childMemberId: `${purchaserId}`,
childMemberManageRoleId: `${purchaserRoleId}`,
childMemberRoleId: `${purchaserRoleId}`,
}).then(res => {
if (res.code === 1000) {
setBalance(res.data);
......
......@@ -34,7 +34,7 @@ export interface RuleSettingProps {
const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const { addSchemaAction, schema, formSubmit, onFieldChange = () => {} } = props
const [visibleChannelRroduct, setVisibleChannelRroduct] = useState(false)
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({customKey: 'MemberManageRoleId'})
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({customKey: 'memberRoleId'})
const [initValue, setInitialValue] = useState({})
const [membersLength, setMembersLength] = useState(0)
......@@ -47,19 +47,19 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const fetchMembersList = async (params) => {
const res = await PublicApi.getMemberManageAllProviderPage(params)
const { code, data } = res
let _data = data.data.map(item => ({ ...item, MemberManageRoleId: item.memberId + '_' + item.roleId }))
let _data = data.data.map(item => ({ ...item, memberRoleId: item.memberId + '_' + item.roleId }))
return { totalCount: data.totalCount, data: _data }
}
// table删除商品
const handleDeleteTable = (id) => {
const value = addSchemaAction.getFieldValue('memberIds')
addSchemaAction.setFieldValue('memberIds', findItemAndDelete(value, id, 'MemberManageRoleId'))
addSchemaAction.setFieldValue('memberIds', findItemAndDelete(value, id, 'memberRoleId'))
}
const handleAddMemberBtn = () => {
const checkBoxs = addSchemaAction.getFieldValue('memberIds')
memberRowCtl.setSelectedRowKeys(checkBoxs.map(v => v.MemberManageRoleId))
memberRowCtl.setSelectedRowKeys(checkBoxs.map(v => v.memberRoleId))
memberRowCtl.setSelectRow(checkBoxs)
setVisibleChannelRroduct(true)
}
......@@ -98,7 +98,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
{
dataIndex: 'ctl',
title: '操作',
render: (_, record) => <Button type='link' onClick={() => handleDeleteTable(record.MemberManageRoleId)}>删除</Button>
render: (_, record) => <Button type='link' onClick={() => handleDeleteTable(record.memberRoleId)}>删除</Button>
}
]
......@@ -120,9 +120,9 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const columnsSetProduct: any[] = [
{
dataIndex: 'MemberManageRoleId',
dataIndex: 'memberRoleId',
title: 'MRID',
key: 'MemberManageRoleId',
key: 'memberRoleId',
className: 'commonHide'
},
{
......@@ -258,7 +258,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const getBindingMembers = async ({id = '1', current = '1', pageSize = '10'}) => {
const res = await PublicApi.getOrderTradingRulesBackgroundMember({id, current, pageSize})
const { code, data } = res
let _data = data.data.map(item => ({ ...item, MemberManageRoleId: item.memberId + '_' + item.roleId }))
let _data = data.data.map(item => ({ ...item, memberRoleId: item.memberId + '_' + item.roleId }))
return { totalCount: data.totalCount, data: _data }
}
......@@ -325,7 +325,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
}
}
tableProps={{
rowKey: 'MemberManageRoleId'
rowKey: 'memberRoleId'
}}
/>
......
......@@ -105,7 +105,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
type: 'array:number',
"x-component": 'MultTable',
"x-component-props": {
rowKey: 'MemberManageRoleId',
rowKey: 'memberRoleId',
columns: "{{tableColumns}}",
prefix: "{{tableAddButton}}"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment