Commit 743e87d6 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

修改会员支付策略配置

parent caa03f43
...@@ -62,6 +62,7 @@ const PaySetting: React.FC<{}> = () => { ...@@ -62,6 +62,7 @@ const PaySetting: React.FC<{}> = () => {
roleList: [] roleList: []
}) })
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'memberId' }) const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'memberId' })
const [memberIdRoleIds, setmemberIdRoleIds] = useState<any>([])
const [optionType, setoptionType] = useState(0) const [optionType, setoptionType] = useState(0)
const { preview, pageStatus } = usePageStatus() const { preview, pageStatus } = usePageStatus()
// const initValue = useInitValue(PublicApi.getPayPayMemberTacticsDetails) // const initValue = useInitValue(PublicApi.getPayPayMemberTacticsDetails)
...@@ -178,10 +179,14 @@ const PaySetting: React.FC<{}> = () => { ...@@ -178,10 +179,14 @@ const PaySetting: React.FC<{}> = () => {
payActions.setFieldValue(`id-${index}`, item.id) payActions.setFieldValue(`id-${index}`, item.id)
payActions.setFieldValue(`ruleConfigurationId-${index}`, item.ruleConfigurationId) payActions.setFieldValue(`ruleConfigurationId-${index}`, item.ruleConfigurationId)
// payActions.setFieldValue(`payWayIds-${index}`,item.payWayIds) // payActions.setFieldValue(`payWayIds-${index}`,item.payWayIds)
const ids: any = [];
item.payWays.forEach((v) => { item.payWays.forEach((v) => {
payActions.setFieldValue(`payWayIds-${index}`, v.id) ids.push(v.id)
console.log(ids, 10086)
payActions.setFieldValue(`payWayIds-${index}`, ids)
}) })
}) })
setmemberIdRoleIds(data.memberIdRoleIds)
payActions.setFieldValue('isSelected', data.isSelected) payActions.setFieldValue('isSelected', data.isSelected)
} }
}) })
...@@ -402,15 +407,20 @@ const PaySetting: React.FC<{}> = () => { ...@@ -402,15 +407,20 @@ const PaySetting: React.FC<{}> = () => {
paymentPolicyPayWayRequests, paymentPolicyPayWayRequests,
} }
if (values.isSelected === 0) { if (values.isSelected === 0) {
const memberIdRoleIds: any = []; if (memberRowCtl.selectRow.length > 0) {
const memberIdRoleId: any = [];
memberRowCtl.selectRow.forEach((v => { memberRowCtl.selectRow.forEach((v => {
memberIdRoleIds.push({ memberIdRoleId.push({
memberId: v.memberId, memberId: v.memberId,
roleId: v.roleId roleId: v.roleId
}) })
})) }))
param.memberIdRoleIds = memberIdRoleId
} else {
param.memberIdRoleIds = memberIdRoleIds param.memberIdRoleIds = memberIdRoleIds
} }
}
//新增 //新增
if (!usePageStatus().id) { if (!usePageStatus().id) {
PublicApi.postPayPayMemberTacticsAdd({ ...param }).then(res => { PublicApi.postPayPayMemberTacticsAdd({ ...param }).then(res => {
......
...@@ -91,7 +91,8 @@ export const strategyDetailTab = (props: any, usePageStatus: any) => { ...@@ -91,7 +91,8 @@ export const strategyDetailTab = (props: any, usePageStatus: any) => {
"type": 'object', "type": 'object',
"x-component": 'tabpane', "x-component": 'tabpane',
"x-component-props": { "x-component-props": {
tab: '基本信息' tab: '基本信息',
forceRender: true
}, },
"properties": { "properties": {
...@@ -124,7 +125,8 @@ export const strategyDetailTab = (props: any, usePageStatus: any) => { ...@@ -124,7 +125,8 @@ export const strategyDetailTab = (props: any, usePageStatus: any) => {
"type": 'object', "type": 'object',
"x-component": 'tabpane', "x-component": 'tabpane',
"x-component-props": { "x-component-props": {
tab: '适用会员' tab: '适用会员',
forceRender: true
}, },
properties: { properties: {
MEGA_LAYOUT2: { MEGA_LAYOUT2: {
......
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