Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project
jinfa-admin
Commits
da792376
Commit
da792376
authored
Sep 10, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接完已有接口
parent
2bffb388
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
343 additions
and
171 deletions
+343
-171
index.ts
src/constants/index.ts
+3
-0
addEquity.tsx
src/pages/member/memberLevel/addEquity.tsx
+3
-1
addMember.tsx
src/pages/member/memberMaintain/addMember.tsx
+255
-122
index.tsx
src/pages/member/memberMaintain/schema/index.tsx
+66
-40
auditPr1.tsx
src/pages/member/memberPr1/auditPr1.tsx
+4
-2
auditPr2.tsx
src/pages/member/memberPr2/auditPr2.tsx
+4
-2
auditPrComfirm.tsx
src/pages/member/memberPrConfirm/auditPrComfirm.tsx
+4
-2
auditPrSubmit.tsx
src/pages/member/memberPrSubmit/auditPrSubmit.tsx
+4
-2
No files found.
src/constants/index.ts
View file @
da792376
...
...
@@ -82,6 +82,9 @@ export const STATUS_ENUM = [
}
]
// 1是阿里云oss服务器, 2是本地文件服务器
export
const
UPLOAD_TYPE
=
isDev
?
2
:
1
// 会员规则类型
export
const
VIP_RULE_TRANSACTION
=
1
;
// 交易
export
const
VIP_RULE_LOGIN
=
2
;
// 登录
...
...
src/pages/member/memberLevel/addEquity.tsx
View file @
da792376
...
...
@@ -172,9 +172,11 @@ const addEquity: React.FC<[]> = () => {
setSubmitLoading
(
true
);
try
{
const
res
=
await
Promise
.
all
(
promises
);
const
resArr
=
await
Promise
.
all
(
promises
);
if
(
resArr
.
every
(
item
=>
item
&&
item
.
code
===
1000
))
{
message
.
success
(
'保存成功'
);
getMemberLevelInfo
();
}
}
catch
(
errInfo
)
{
}
...
...
src/pages/member/memberMaintain/addMember.tsx
View file @
da792376
import
React
,
{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Badge
,
Button
,
Card
,
message
}
from
'antd'
;
import
{
history
,
Prompt
}
from
'umi'
;
import
{
Badge
,
Button
,
Card
,
Spin
,
message
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
Select
,
Input
}
from
'@formily/antd-components'
import
{
merge
}
from
'rxjs'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
initDetailSchema
}
from
'./schema'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetMemberAbilitySubGetResponse
}
from
'@/services/MemberApi'
;
import
{
initDetailSchema
}
from
'./schema'
;
const
formActions
=
createFormActions
();
const
{
onFieldValueChange$
,
onFieldInputChange$
,
onFormInputChange$
,
}
=
FormEffectHooks
;
const
a
ddMember
:
React
.
FC
<
any
>
=
props
=>
{
const
ref
=
useRef
<
any
>
({}
);
const
A
ddMember
:
React
.
FC
<
any
>
=
props
=>
{
const
{
id
,
validateId
}
=
usePageStatus
(
);
const
[
memberItems
,
setMemberItems
]
=
useState
<
any
>
({});
const
[
memberInfo
,
setMemberInfo
]
=
useState
<
GetMemberAbilitySubGetResponse
>
(
null
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
unsaved
,
setUnsaved
]
=
useState
(
false
);
const
data
=
[
{
key
:
'1'
,
sn
:
'1'
,
roleName
:
'供应商'
,
status
:
'1'
,
operation
:
'申请注册'
,
useTime
:
'2020-05-12 08:08'
,
result
:
'无'
,
},
];
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'序号'
,
dataIndex
:
'sn'
,
align
:
'center'
,
key
:
'sn'
,
},
{
title
:
'操作角色'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
key
:
'roleName'
,
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
align
:
'center'
,
key
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
component
=
<
Badge
color=
"#FFC400"
text=
"待审核"
/>;
return
component
;
},
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
align
:
'center'
,
key
:
'operation'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'useTime'
,
align
:
'center'
,
key
:
'useTime'
,
},
{
title
:
'审核意见'
,
dataIndex
:
'result'
,
align
:
'center'
,
key
:
'result'
,
},
];
const
getDetailedInfo
=
async
()
=>
{
if
(
id
&&
validateId
)
{
setInfoLoading
(
true
);
const
infoRes
=
await
PublicApi
.
getMemberAbilitySubGet
({
memberId
:
id
,
validateId
,
});
useEffect
(()
=>
{
PublicApi
.
getMemberMaintenanceAddpageitems
().
then
(
res
=>
{
setMemberItems
(
res
.
data
);
if
(
infoRes
.
code
!==
1000
)
{
return
;
}
const
{
memberTypeEnum
,
groups
=
[],
areaCodes
,
account
,
channelLevelTag
,
channelTypeName
,
countryCode
,
createTime
,
currentStep
,
levelTag
,
memberId
,
memberTypeName
,
name
,
outerHistory
,
outerStatusName
,
roleName
,
verifySteps
,
...
rest
}:
any
=
infoRes
.
data
;
// 注册资料处理
const
detail
=
{};
for
(
let
i
=
0
;
i
<
groups
.
length
;
i
++
)
{
const
item
=
groups
[
i
];
if
(
item
.
elements
)
{
for
(
let
j
=
0
;
j
<
item
.
elements
.
length
;
j
++
)
{
const
ele
=
item
.
elements
[
j
];
detail
[
ele
.
fieldName
]
=
ele
.
fieldValue
;
}
}
}
setMemberInfo
({
memberTypeId
:
memberTypeEnum
,
...
rest
,
areas
:
areaCodes
,
channelLevel
:
channelLevelTag
,
...
detail
,
});
setInfoLoading
(
false
);
}
};
useEffect
(()
=>
{
// getDetailedInfo();
},
[]);
// 模拟请求
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
queryResult
=
data
.
find
(
v
=>
v
.
key
===
params
.
keywords
);
const
handleSubmit
=
(
values
:
any
)
=>
{
const
{
memberTypeId
,
roleId
,
levelId
,
countryCodeId
,
phone
,
email
,
outerStatus
,
status
,
statusName
,
...
rest
}
=
values
;
if
(
!
id
)
{
setSubmitLoading
(
true
);
const
msg
=
message
.
loading
({
content
:
'正在添加,请稍候...'
,
duration
:
0
,
});
PublicApi
.
postMemberMaintenanceAddmember
({
memberTypeId
,
roleId
,
levelId
,
countryCodeId
,
phone
,
email
,
detail
:
rest
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setTimeout
(()
=>
{
resolve
({
code
:
200
,
message
:
''
,
data
:
queryResult
?
[
queryResult
]
:
data
,
history
.
goBack
();
},
800
);
}).
finally
(()
=>
{
msg
();
setSubmitLoading
(
false
);
});
},
1000
);
}
else
{
setSubmitLoading
(
true
);
const
msg
=
message
.
loading
({
content
:
'正在保存,请稍候...'
,
duration
:
0
,
});
// PublicApi.postMemberAbilitySubUpdate({
// memberId: id,
// validateId,
// memberTypeId,
// roleId,
// levelId,
// countryCodeId,
// phone,
// email,
// channelTypeId,
// remark,
// detail: rest,
// }).then(res => {
// if (res.code !== 1000) {
// return;
// }
// setUnsaved(false);
// setTimeout(() => {
// history.replace('/memberCenter/memberAbility/manage/import');
// }, 800);
// }).finally(() => {
// msg();
// setSubmitLoading(false);
// });
}
};
const
handleSubmit
=
(
values
:
any
)
=>
{
console
.
log
(
values
);
};
// 会员类型、注册手机下拉框
const
getPageitemsBasic
=
async
()
=>
{
const
res
=
await
PublicApi
.
getMemberMaintenanceAddpageitems
();
if
(
res
.
code
===
1000
)
{
const
{
data
=
{}
}:
any
=
res
;
const
{
memberTypes
=
[],
countryCodes
=
[],
}
=
data
;
// 会员类型、会员角色、会员等级选项
const
fetchSelectOptions
=
async
()
=>
{
const
{
data
}
=
await
PublicApi
.
getMemberMaintenanceAddpageitems
();
return
{
memberTypeId
:
fetchSomeOptions
(
data
.
memberTypes
),
roleId
:
fetchSomeOptions
(
data
.
memberRoles
),
level
:
fetchSomeOptions
(
data
.
memberLevels
),
memberTypeId
:
memberTypes
.
map
(
item
=>
({
label
:
item
.
memberTypeName
,
value
:
item
.
memberTypeId
})),
countryCodeId
:
countryCodes
.
map
(
item
=>
({
label
:
item
.
text
,
value
:
item
.
id
})),
};
}
return
{};
};
// 获取手机code
const
fetchTelCode
=
async
()
=>
{
const
{
data
}
=
await
PublicApi
.
getManageGetTelCode
();
return
data
;
};
const
useAsyncLinkageEffect
=
()
=>
{
const
linkage
=
useLinkageUtils
();
const
fetchSomeOptions
=
data
=>
{
return
data
.
map
(
v
=>
({
label
:
v
.
text
,
value
:
v
.
id
}));
};
// 间接触发根据会员类型
onFieldValueChange$
(
'memberTypeId'
).
subscribe
(
fieldState
=>
{
if
(
!
fieldState
.
value
)
{
return
;
}
// 查询角色下拉
linkage
.
loading
(
'roleId'
);
PublicApi
.
getMemberMaintenanceAddpageitemsRole
({
memberTypeId
:
fieldState
.
value
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
data
=
[]
}
=
res
;
const
options
=
data
.
map
(
item
=>
({
label
:
item
.
roleName
,
value
:
item
.
roleId
}));
linkage
.
enum
(
'roleId'
,
options
);
}
}).
finally
(()
=>
{
linkage
.
loaded
(
'roleId'
);
});
});
const
beforeUpload
=
(
file
:
any
)
=>
{
const
isJpgOrPng
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
||
file
.
type
===
'image/jpg'
;
if
(
!
isJpgOrPng
)
{
message
.
error
(
'仅支持上传JPEG/JPG/PNG文件!'
);
// 根据会员类型
onFieldInputChange$
(
'memberTypeId'
).
subscribe
(
fieldState
=>
{
if
(
!
fieldState
.
value
)
{
return
;
}
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
isLt2M
)
{
message
.
error
(
'上传图片不超过2MB!'
);
linkage
.
value
(
'roleId'
,
undefined
);
linkage
.
enum
(
'roleId'
,
[]);
linkage
.
value
(
'levelId'
,
undefined
);
linkage
.
enum
(
'levelId'
,
[]);
});
// 根据会员角色,查询其他注册资料
onFieldValueChange$
(
'roleId'
).
subscribe
(
fieldState
=>
{
if
(
!
fieldState
.
value
)
{
return
;
}
// PublicApi.getMemberAbilitySubPageitemsDetail({
// roleId: fieldState.value,
// }).then(res => {
// if (res.code === 1000) {
// const { data = [] } = res;
// setMemberItems(data);
// }
// });
});
// 手动触发改变的话重置等级下拉框
onFieldInputChange$
(
'*(memberTypeId,roleId)'
).
subscribe
(()
=>
{
linkage
.
value
(
'levelId'
,
undefined
);
linkage
.
enum
(
'levelId'
,
[]);
});
// 根据会员类型和角色,查询等级下拉
onFieldValueChange$
(
'*(memberTypeId,roleId)'
).
subscribe
(
fieldState
=>
{
const
selfName
=
fieldState
.
name
;
const
selfValue
=
fieldState
.
value
;
const
otherName
=
selfName
==
'memberTypeId'
?
'roleId'
:
'memberTypeId'
;
const
otherValue
=
formActions
.
getFieldState
(
otherName
,
state
=>
state
.
value
);
if
(
selfValue
&&
otherValue
)
{
linkage
.
loading
(
'levelId'
);
PublicApi
.
getMemberMaintenanceAddpageitemsLevel
({
memberTypeId
:
selfName
==
'memberTypeId'
?
selfValue
:
otherValue
,
roleId
:
selfName
==
'memberTypeId'
?
otherValue
:
selfValue
,
},
{
useCache
:
true
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
data
=
[]
}
=
res
;
const
options
=
data
.
map
(
item
=>
({
label
:
item
.
levelTag
,
value
:
item
.
levelId
}));
linkage
.
enum
(
'levelId'
,
options
);
}
}).
finally
(()
=>
{
linkage
.
loaded
(
'levelId'
);
});
}
});
}
return
isJpgOrPng
&&
isLt2M
;
};
return
(
<
Spin
spinning=
{
infoLoading
}
>
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
props
.
location
.
query
.
type
===
'add'
?
'新建会员'
:
props
.
location
.
query
.
type
===
'change'
?
'编辑会员'
:
'查看会员'
}
title=
{
!
id
?
'新建会员'
:
'编辑会员'
}
extra=
{
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
loading=
{
submitLoading
}
onClick=
{
()
=>
formActions
.
submit
()
}
>
保存
...
...
@@ -161,24 +289,29 @@ const addMember: React.FC<any> = props => {
<
NiceForm
onSubmit=
{
handleSubmit
}
actions=
{
formActions
}
initialValues=
{
memberInfo
||
{}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
);
useAsyncInitSelect
(
[
'memberTypeId'
,
'roleId'
,
'level
'
],
fetchSelectOptions
,
[
'memberTypeId'
,
'countryCodeId
'
],
getPageitemsBasic
,
);
useAsyncSelect
(
'telCode'
,
fetchTelCode
);
useAsyncLinkageEffect
();
onFormInputChange$
().
subscribe
(()
=>
{
if
(
!
unsaved
)
{
setUnsaved
(
true
);
}
});
}
}
schema=
{
initDetailSchema
(
memberItems
)
}
/>
</
Card
>
</
PageHeaderWrapper
>
<
Prompt
when=
{
unsaved
}
message=
"您还有未保存的内容,是否确定要离开?"
/>
</
Spin
>
);
};
export
default
a
ddMember
;
export
default
A
ddMember
;
src/pages/member/memberMaintain/schema/index.tsx
View file @
da792376
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
export
const
importSchema
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -154,44 +156,59 @@ export const auditModalSchema: ISchema = {
},
};
const
getCompnentValue
=
(
elements
:
any
)
=>
{
let
components
=
{};
for
(
let
item
of
elements
)
{
let
xComponentProps
=
item
.
fieldType
===
'string'
?
{
const
FIELD_TYPE_MAP
=
{
'string'
:
'string'
,
'long'
:
'string'
,
'upload'
:
'customUpload'
,
};
const
getXComponentProps
=
(
type
,
item
)
=>
{
const
MAP
=
{
'string'
:
{
placeholder
:
item
.
fieldRemark
,
}
:
{
},
'upload'
:
{
listType
:
'card'
,
action
:
'/api/file/file/upload'
,
data
:
{
fileType
:
2
},
data
:
{
fileType
:
UPLOAD_TYPE
},
fileList
:
[],
onChange
:
file
=>
console
.
log
(
file
),
},
};
return
MAP
[
type
];
};
const
getCompnentValue
=
(
elements
:
any
)
=>
{
const
components
=
{};
for
(
let
item
of
elements
)
{
// 先判断是否存在 type,防止不存在的 type 报错
const
realType
=
FIELD_TYPE_MAP
[
item
.
fieldType
];
if
(
realType
)
{
components
[
item
.
fieldName
]
=
{
type
:
item
.
fieldType
,
type
:
FIELD_TYPE_MAP
[
item
.
fieldType
]
,
required
:
item
.
fieldEmpty
===
0
,
title
:
item
.
fieldCNName
,
'x-component-props'
:
xComponentProps
,
'x-component-props'
:
getXComponentProps
(
realType
,
item
)
,
};
}
}
return
components
;
};
export
const
initDetailSchema
=
(
props
:
any
)
=>
{
let
tabSchema
=
{
let
tabSchema
:
ISchema
=
{
properties
:
{
'tab-1'
:
{
type
:
'object'
,
'x-component'
:
'
tabp
ane'
,
'x-component'
:
'
TabP
ane'
,
'x-component-props'
:
{
tab
:
'基本信息'
,
},
properties
:
{
MEGA_LAYOUT1
:
{
type
:
'object'
,
'x-component'
:
'
mega-l
ayout'
,
'x-component'
:
'
Mega-L
ayout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
8
,
...
...
@@ -215,8 +232,11 @@ export const initDetailSchema = (props: any) => {
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
'x-props'
:
{
hasFeedback
:
true
,
},
level
:
{
},
levelId
:
{
type
:
'string'
,
required
:
true
,
title
:
'会员等级'
,
...
...
@@ -224,25 +244,20 @@ export const initDetailSchema = (props: any) => {
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
'x-props'
:
{
hasFeedback
:
true
,
},
},
MEGA_LAYOUT1_1
:
{
type
:
'object'
,
'x-component'
:
'
mega-l
ayout'
,
'x-component'
:
'
Mega-L
ayout'
,
'x-component-props'
:
{
label
:
'注册手机'
,
wrapperCol
:
24
,
required
:
true
,
inline
:
true
,
},
properties
:
{
MEGA_LAYOUT1_1_1
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
},
properties
:
{
telCode
:
{
countryCodeId
:
{
type
:
'string'
,
enum
:
[],
'x-component-props'
:
{
...
...
@@ -250,23 +265,32 @@ export const initDetailSchema = (props: any) => {
},
required
:
true
,
},
tel
:
{
phone
:
{
type
:
'string'
,
'x-mega-props'
:
{
span
:
2
},
required
:
true
,
'x-component-props'
:
{
placeholder
:
'请输入你的手机号码'
,
maxLength
:
11
,
},
required
:
true
,
},
'x-rules'
:
[
{
pattern
:
PATTERN_MAPS
.
phone
,
message
:
'请输入正确格式的手机号'
,
},
],
},
},
},
memberE
mail
:
{
e
mail
:
{
type
:
'string'
,
title
:
'邮箱'
,
'x-component-props'
:
{},
'x-rules'
:
[
{
pattern
:
PATTERN_MAPS
.
email
,
message
:
'请输入正确格式的邮箱'
,
},
],
},
},
},
...
...
@@ -275,18 +299,18 @@ export const initDetailSchema = (props: any) => {
},
};
if
(
Object
.
keys
(
props
).
length
>
0
)
{
for
(
let
[
index
,
item
]
of
props
.
groups
.
entries
())
{
tabSchema
.
properties
[
`tab-
${
index
+
2
}
`
]
=
{
if
(
Array
.
isArray
(
props
)
)
{
for
(
let
[
index
,
item
]
of
props
.
entries
())
{
tabSchema
.
properties
!
[
`tab-
${
index
+
2
}
`
]
=
{
type
:
'object'
,
'x-component'
:
'
tabp
ane'
,
'x-component'
:
'
TabP
ane'
,
'x-component-props'
:
{
tab
:
item
.
groupName
,
},
properties
:
{
[
`MEGA_LAYOUT
${
index
+
2
}
`
]:
{
type
:
'object'
,
'x-component'
:
'
mega-l
ayout'
,
'x-component'
:
'
Mega-L
ayout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
8
,
...
...
@@ -299,13 +323,15 @@ export const initDetailSchema = (props: any) => {
}
}
let
detailSchema
=
{
let
detailSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
REPOSIT_TABS
:
{
tabs
:
{
type
:
'object'
,
'x-component'
:
'tab'
,
'x-component-props'
:
{},
'x-component'
:
'Tab'
,
'x-component-props'
:
{
type
:
'card'
,
},
...
tabSchema
,
},
},
...
...
src/pages/member/memberPr1/auditPr1.tsx
View file @
da792376
...
...
@@ -237,12 +237,14 @@ const AuditPr1: React.FC<QueryProps> = props => {
}),
];
Promise
.
all
(
promises
).
then
(
res
=>
{
setConfirmLoading
(
false
);
Promise
.
all
(
promises
).
then
(
res
Arr
=>
{
if
(
resArr
.
every
(
item
=>
item
&&
item
.
code
===
1000
))
{
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
setModalVisible
(
false
);
}
setConfirmLoading
(
false
);
}).
catch
(()
=>
{
setConfirmLoading
(
false
);
});
...
...
src/pages/member/memberPr2/auditPr2.tsx
View file @
da792376
...
...
@@ -237,12 +237,14 @@ const AuditPr2: React.FC<QueryProps> = props => {
}),
];
Promise
.
all
(
promises
).
then
(
res
=>
{
setConfirmLoading
(
false
);
Promise
.
all
(
promises
).
then
(
res
Arr
=>
{
if
(
resArr
.
every
(
item
=>
item
&&
item
.
code
===
1000
))
{
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
setModalVisible
(
false
);
}
setConfirmLoading
(
false
);
}).
catch
(()
=>
{
setConfirmLoading
(
false
);
});
...
...
src/pages/member/memberPrConfirm/auditPrComfirm.tsx
View file @
da792376
...
...
@@ -237,12 +237,14 @@ const AuditPrComfirm: React.FC<QueryProps> = props => {
}),
];
Promise
.
all
(
promises
).
then
(
res
=>
{
setConfirmLoading
(
false
);
Promise
.
all
(
promises
).
then
(
res
Arr
=>
{
if
(
resArr
.
every
(
item
=>
item
&&
item
.
code
===
1000
))
{
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
setModalVisible
(
false
);
}
setConfirmLoading
(
false
);
}).
catch
(()
=>
{
setConfirmLoading
(
false
);
});
...
...
src/pages/member/memberPrSubmit/auditPrSubmit.tsx
View file @
da792376
...
...
@@ -237,12 +237,14 @@ const AuditPrSubmit: React.FC<QueryProps> = props => {
}),
];
Promise
.
all
(
promises
).
then
(
res
=>
{
setConfirmLoading
(
false
);
Promise
.
all
(
promises
).
then
(
res
Arr
=>
{
if
(
resArr
.
every
(
item
=>
item
&&
item
.
code
===
1000
))
{
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
setModalVisible
(
false
);
}
setConfirmLoading
(
false
);
}).
catch
(()
=>
{
setConfirmLoading
(
false
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment