Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
linweijiong
jinfa-platform
Commits
90f2c422
Commit
90f2c422
authored
Jan 26, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
b6d3b129
7a5f11e4
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
84 additions
and
10 deletions
+84
-10
memberRoute.ts
config/routes/memberRoute.ts
+8
-0
menu.ts
src/locales/zh-CN/menu.ts
+1
-0
PaycodeVerifyPanel.tsx
...tting/components/VerifyPanel/Panel/PaycodeVerifyPanel.tsx
+2
-2
InvoiceArray.tsx
src/pages/balance/components/InvoiceCreate/InvoiceArray.tsx
+1
-1
InvoiceDrawer.tsx
src/pages/balance/components/InvoiceCreate/InvoiceDrawer.tsx
+7
-2
index.tsx
src/pages/home/components/UserCenter/index.tsx
+5
-2
index.tsx
...pages/member/memberImport/components/MemberForm/index.tsx
+46
-3
editMember.tsx
src/pages/member/memberImport/editMember.tsx
+0
-0
editMySelf.tsx
src/pages/member/memberImport/editMySelf.tsx
+14
-0
No files found.
config/routes/memberRoute.ts
View file @
90f2c422
...
...
@@ -40,6 +40,14 @@ const MemberRoute: RouterChild = {
noMargin
:
true
,
component
:
'@/pages/member/memberImport/editMember'
,
},
// 修改 自己个人信息
{
path
:
'/memberCenter/memberAbility/manage/import/editMySelf'
,
name
:
'editMySelf'
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/member/memberImport/editMySelf'
,
},
// 会员导入-详情
{
path
:
'/memberCenter/memberAbility/manage/import/detail'
,
...
...
src/locales/zh-CN/menu.ts
View file @
90f2c422
...
...
@@ -81,6 +81,7 @@ export default {
'menu.memberAbility.memberManage.memberImport'
:
'会员导入'
,
'menu.memberAbility.memberManage.addMember'
:
'新建会员'
,
'menu.memberAbility.memberManage.editMember'
:
'编辑会员'
,
'menu.memberAbility.memberManage.editMySelf'
:
'修改会员信息'
,
'menu.memberAbility.memberManage.memberImportDetail'
:
'会员导入详情'
,
'menu.memberAbility.memberManage.memberMaintain'
:
'会员维护'
,
'menu.memberAbility.memberManage.maintianDetail'
:
'会员详情'
,
...
...
src/pages/accountSetting/components/VerifyPanel/Panel/PaycodeVerifyPanel.tsx
View file @
90f2c422
...
...
@@ -64,7 +64,7 @@ const PaycodeVerifyPanel: React.FC<IProps> = (props) => {
// 验证旧的支付密码
const
handleVerifySuccess
=
()
=>
{
const
payPassword
=
form
.
getFieldValue
(
'paycode'
);
const
payPassword
=
encryptedByAES
(
form
.
getFieldValue
(
'paycode'
)
);
const
service
=
PublicApi
.
postMemberSecurityPayCheck
;
service
({
payPassword
:
payPassword
},
{
ctlType
:
"none"
}).
then
((
data
)
=>
{
console
.
log
(
data
);
...
...
@@ -96,7 +96,7 @@ const PaycodeVerifyPanel: React.FC<IProps> = (props) => {
noStyle
rules=
{
[{
required
:
true
,
message
:
'请填写支付密码'
}]
}
>
<
Input
autoComplete=
"off"
/>
<
Input
.
Password
autoComplete=
"off"
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
...
...
src/pages/balance/components/InvoiceCreate/InvoiceArray.tsx
View file @
90f2c422
...
...
@@ -76,7 +76,7 @@ const InvoiceArray = (props) => {
{
toArr
(
value
).
map
((
item
,
index
)
=>
{
return
(
<
RowStyleLayout
{
...
componentProps
}
key=
{
index
}
>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
position
:
'relative'
}
}
>
<
SchemaField
path=
{
FormPath
.
parse
(
path
).
concat
(
index
)
}
/>
{
length
-
1
===
index
...
...
src/pages/balance/components/InvoiceCreate/InvoiceDrawer.tsx
View file @
90f2c422
...
...
@@ -132,11 +132,13 @@ const InvoiceDrawer: React.FC<Iprops> = (props) => {
getContainer=
{
false
}
destroyOnClose
visible=
{
visible
}
bodyStyle=
{
{
overflow
:
'auto'
}
}
title=
{
title
}
width=
{
width
}
onClose=
{
onCancel
}
footer=
{
renderFooter
()
}
>
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
}
}
>
<
InvoiceInfo
infos=
{
invoiceInfo
}
/>
{
type
===
TypeEnum
.
edit
...
...
@@ -147,6 +149,7 @@ const InvoiceDrawer: React.FC<Iprops> = (props) => {
<
div
className=
{
styles
.
invoiceDate
}
>
开票日期
</
div
>
<
div
>
备注
</
div
>
</
div
>
{
/* getPopupContainer={triggerNode => { console.log(triggerNode, triggerNode.parentElement); return triggerNode.parentNode}} */
}
<
SchemaForm
onSubmit=
{
handleForm
}
actions=
{
formActions
}
components=
{
{
InvoiceArray
,
Input
,
DatePicker
}
}
>
<
Field
name=
"list"
...
...
@@ -155,7 +158,9 @@ const InvoiceDrawer: React.FC<Iprops> = (props) => {
>
<
Field
type=
"object"
>
<
Field
name=
"number"
x
-
component=
"Input"
x
-
rules=
{
[{
required
:
true
,
message
:
'请填写发票号'
}]
}
/>
<
Field
name=
"invoiceDate"
x
-
component=
"DatePicker"
x
-
rules=
{
[{
required
:
true
,
message
:
'请选择发票日期'
}]
}
/>
<
Field
name=
"invoiceDate"
x
-
component
-
props=
{
{
getPopupContainer
:
(
triggernode
)
=>
triggernode
.
parentElement
}
}
x
-
component=
"DatePicker"
x
-
rules=
{
[{
required
:
true
,
message
:
'请选择发票日期'
}]
}
/>
<
Field
name=
"remark"
x
-
component=
"Input"
x
-
component
-
props=
{
{
style
:
{
width
:
'240px'
}}
}
/>
</
Field
>
</
Field
>
...
...
@@ -171,7 +176,7 @@ const InvoiceDrawer: React.FC<Iprops> = (props) => {
)
}
</
div
>
</
Drawer
>
)
}
...
...
src/pages/home/components/UserCenter/index.tsx
View file @
90f2c422
...
...
@@ -21,7 +21,7 @@ interface Iprops {}
const
WEEKDAYS
=
[
"天"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
];
const
LEVEL_IMAGE
=
[
level1
,
level1
,
level2
,
level3
,
level4
];
const
EDIT_USER_URL
=
'/memberCenter/memberAbility/
query
'
;
const
EDIT_USER_URL
=
'/memberCenter/memberAbility/
manage/import/editMySelf
'
;
const
USER_CENTER_URL
=
'/memberCenter/memberAbility/manage/maintain'
const
STATUS_COLOR
:
(
"default"
|
"processing"
|
"error"
|
"success"
)[]
=
[
"default"
,
"processing"
,
"error"
,
"success"
]
...
...
@@ -64,7 +64,7 @@ const UserCenter: React.FC<Iprops> = (props) => {
if
(
info
.
file
.
status
===
'done'
)
{
const
{
code
,
data
}
=
info
.
file
.
response
if
(
code
===
1000
)
{
PublicApi
.
postMember
Business
LogoAdd
({
logo
:
data
})
PublicApi
.
postMember
Mainpage
LogoAdd
({
logo
:
data
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
dispatch
({
type
:
'done'
,
payload
:
{
url
:
data
}})
...
...
@@ -134,7 +134,10 @@ const UserCenter: React.FC<Iprops> = (props) => {
</
div
>
</
div
>
</
div
>
{
userAuth
.
validateStatus
===
2
&&
<
Link
to=
{
EDIT_USER_URL
}
className=
{
styles
.
link
}
>
修改会员信息
</
Link
>
}
</
div
>
<
div
className=
{
styles
.
otherValues
}
>
<
div
className=
{
styles
.
divider
}
>
...
...
src/pages/member/memberImport/components/MemberForm/index.tsx
View file @
90f2c422
...
...
@@ -28,11 +28,13 @@ interface MemberFormProps {
validateId
?:
number
;
// 是否是编辑的
isEdit
?:
boolean
,
mode
?:
'myself'
|
"any"
};
const
MemberForm
:
React
.
FC
<
MemberFormProps
>
=
({
id
,
validateId
,
mode
,
isEdit
=
false
,
})
=>
{
const
areaRef
=
useRef
<
any
[]
>
([])
...
...
@@ -43,12 +45,19 @@ const MemberForm: React.FC<MemberFormProps> = ({
const
[
unsaved
,
setUnsaved
]
=
useState
(
false
);
const
getDetailedInfo
=
async
()
=>
{
if
(
id
&&
validateId
&&
isEdit
)
{
if
(
id
&&
validateId
&&
isEdit
||
mode
===
'myself'
)
{
setInfoLoading
(
true
);
const
infoRes
=
await
PublicApi
.
getMemberAbilitySubGet
({
let
infoRes
=
null
;
if
(
mode
===
'myself'
)
{
infoRes
=
await
PublicApi
.
getMemberMainpageDetailGet
();
}
else
{
infoRes
=
await
PublicApi
.
getMemberAbilitySubGet
({
memberId
:
`
${
id
}
`
,
validateId
:
`
${
validateId
}
`
,
});
}
if
(
infoRes
.
code
!==
1000
)
{
return
;
...
...
@@ -153,6 +162,14 @@ const MemberForm: React.FC<MemberFormProps> = ({
getDetailedInfo
();
},
[]);
useEffect
(()
=>
{
if
(
mode
===
"myself"
)
{
formActions
.
setFieldState
(
'tabs.tab-1.*'
,
state
=>
{
state
.
editable
=
false
;
});
}
},
[
mode
])
const
handleSubmit
=
(
values
:
any
)
=>
{
const
{
memberTypeId
,
...
...
@@ -242,6 +259,28 @@ const MemberForm: React.FC<MemberFormProps> = ({
setSubmitLoading
(
false
);
});
}
if
(
mode
===
'myself'
)
{
setSubmitLoading
(
true
);
const
msg
=
message
.
loading
({
content
:
'正在保存,请稍候...'
,
duration
:
0
,
});
PublicApi
.
postMemberMainpageDetailUpdate
({
detail
:
rest
,
}).
then
(({
data
,
code
})
=>
{
if
(
code
!==
1000
)
{
return
;
}
setUnsaved
(
false
);
setTimeout
(()
=>
{
history
.
push
(
'/memberCenter/home'
)
},
800
);
}).
finally
(()
=>
{
msg
();
setSubmitLoading
(
false
);
});
}
};
// 会员类型、注册手机下拉框
...
...
@@ -418,7 +457,7 @@ const MemberForm: React.FC<MemberFormProps> = ({
}
}
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
!
id
?
'新建会员'
:
'编辑会员'
}
title=
{
!
id
&&
mode
!==
"myself"
?
'新建会员'
:
'编辑会员'
}
extra=
{
[
<
Button
key=
"1"
...
...
@@ -460,4 +499,8 @@ const MemberForm: React.FC<MemberFormProps> = ({
);
};
MemberForm
.
defaultProps
=
{
mode
:
'any'
,
}
export
default
MemberForm
;
src/pages/member/memberImport/editMember.tsx
View file @
90f2c422
src/pages/member/memberImport/editMySelf.tsx
0 → 100644
View file @
90f2c422
import
React
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
MemberForm
from
'./components/MemberForm'
;
const
EditMySelf
:
React
.
FC
=
()
=>
{
const
{
id
,
validateId
}
=
usePageStatus
();
console
.
log
(
123
);
return
(
<
MemberForm
id=
{
+
id
}
validateId=
{
+
validateId
}
isEdit=
{
true
}
mode=
{
"myself"
}
/>
);
};
export
default
EditMySelf
;
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