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
陈智峰
jinfa-platform
Commits
917e826b
Commit
917e826b
authored
Dec 10, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 加工物流单, 修改密码页自适应,
parent
ae6e3738
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
63 additions
and
68 deletions
+63
-68
AvatarDropdown.tsx
src/layouts/components/AvatarDropdown.tsx
+6
-4
RightContent.tsx
src/layouts/components/RightContent.tsx
+3
-3
index.tsx
...ges/accountSetting/components/EditDataComponent/index.tsx
+11
-13
index.less
src/pages/accountSetting/components/TypeVerify/index.less
+7
-6
EmailVerifyPanel.tsx
...Setting/components/VerifyPanel/Panel/EmailVerifyPanel.tsx
+3
-4
PaycodeVerifyPanel.tsx
...tting/components/VerifyPanel/Panel/PaycodeVerifyPanel.tsx
+6
-6
PhoneVerifyPanel.tsx
...Setting/components/VerifyPanel/Panel/PhoneVerifyPanel.tsx
+5
-8
ResetPayCode.tsx
...ountSetting/components/VerifyPanel/Panel/ResetPayCode.tsx
+6
-7
index.tsx
src/pages/accountSetting/index.tsx
+12
-13
index.tsx
src/pages/handling/assign/processStock/index.tsx
+4
-4
No files found.
src/layouts/components/AvatarDropdown.tsx
View file @
917e826b
import
{
LogoutOutlined
,
SettingOutlined
,
User
Outlined
}
from
'@ant-design/icons'
;
import
{
LogoutOutlined
,
Lock
Outlined
}
from
'@ant-design/icons'
;
import
{
Avatar
,
Menu
,
Spin
}
from
'antd'
;
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
,
Link
}
from
'umi'
;
import
PersonDropdown
from
'./PersonDropdown'
import
styles
from
'../styles/RightContent.less'
;
import
{
removeAuth
,
removeRouters
,
getAuth
}
from
'@/utils/auth'
;
...
...
@@ -30,6 +30,9 @@ const AvatarDropdown = () => {
个人设置
</Menu.Item>
<Menu.Divider /> */
}
<
Menu
.
Item
>
<
Link
to=
"/memberCenter/systemSetting/accountSetting"
><
LockOutlined
/>
修改密码
</
Link
>
</
Menu
.
Item
>
<
Menu
.
Item
onClick=
{
logout
}
key=
"logout"
>
<
LogoutOutlined
/>
退出登录
...
...
@@ -47,4 +50,4 @@ const AvatarDropdown = () => {
)
}
export
default
AvatarDropdown
\ No newline at end of file
export
default
AvatarDropdown
src/layouts/components/RightContent.tsx
View file @
917e826b
...
...
@@ -30,7 +30,6 @@ const GlobalHeaderRight: React.FC<{}> = (props) => {
const
ws
=
useRef
<
WebSocket
|
null
>
(
null
);
const
webSocketInit
=
useCallback
(()
=>
{
console
.
log
(
ws
.
current
)
if
(
SOCKET_URL
&&
(
!
ws
.
current
||
ws
.
current
.
readyState
===
3
)
&&
userInfo
)
{
const
url
=
`
${
SOCKET_URL
}
/report/websocket?memberId=
${
userInfo
.
memberId
}
&roleId=
${
userInfo
.
memberRoleId
}
&token=
${
userInfo
.
token
}
&source=
${
1
}
`
;
ws
.
current
=
new
WebSocket
(
url
);
...
...
@@ -39,8 +38,9 @@ const GlobalHeaderRight: React.FC<{}> = (props) => {
}
ws
.
current
.
onmessage
=
(
e
)
=>
{
console
.
log
(
e
)
if
(
e
.
data
.
type
===
NOT_READ_MESSAGE
)
{
setMessage
(
e
.
data
.
data
);
const
data
=
JSON
.
parse
(
e
.
data
);
if
(
data
.
type
===
NOT_READ_MESSAGE
)
{
setMessage
(
data
.
data
);
}
};
ws
.
current
.
onclose
=
(
e
)
=>
{
...
...
src/pages/accountSetting/components/EditDataComponent/index.tsx
View file @
917e826b
import
React
,
{
useState
,
useEffect
,
useCallback
}
from
'react'
;
// import { SchemaForm } from '@formily/antd';
// import { SchemaForm } from '@formily/antd';
import
{
Form
,
Input
,
Row
,
Col
,
Button
,
Select
,
message
,
AutoComplete
}
from
'antd'
;
import
styles
from
'./index.less'
;
import
{
StepForwardOutlined
,
CheckCircleOutlined
,
CloseCircleOutlined
}
from
'@ant-design/icons'
;
...
...
@@ -7,7 +7,6 @@ import GetCaptchaCode from '../GetCaptchaCode';
import
classNames
from
'classnames'
import
{
PublicApi
}
from
'@/services/api'
;
import
phoneRegExp
from
'./utils'
;
import
options
from
'@/pages/editor/settingsPanel/propsSettings/Animate/config'
;
const
Option
=
Select
.
Option
;
const
EditDataComponent
=
(
props
)
=>
{
...
...
@@ -19,7 +18,7 @@ const EditDataComponent = (props) => {
const
passwordValidator
=
async
(
rule
,
value
)
=>
{
let
temp
=
{}
let
length
=
value
&&
value
.
length
>=
8
&&
value
.
length
<=
20
;
let
trim
=
!
(
/
\s\S
+|^
\s\S
+|
\s
$/
.
test
(
value
))
//
let
trim
=
!
(
/
\s\S
+|^
\s\S
+|
\s
$/
.
test
(
value
))
//
let
compact
=
/^
(?=
.*
[
0-9
]
.*
)(?=
.*
[
A-Z
]
.*
)(?=
.*
[
a-z
]
.*
)
/
.
test
(
value
);
// 必须含有大小写和数字
temp
[
'length'
]
=
length
temp
[
'trim'
]
=
trim
...
...
@@ -48,7 +47,7 @@ const EditDataComponent = (props) => {
throw
new
Error
(
"请填写正确的手机号"
)
}
setCanSandCode
(
true
);
}
}
// 邮箱验证
const
emailValidator
=
async
(
rule
,
value
)
=>
{
...
...
@@ -69,7 +68,7 @@ const EditDataComponent = (props) => {
}
getAllCountryCode
();
}
},
[])
},
[])
// 获取新手机手机验证码
const
getCode
=
()
=>
{
...
...
@@ -82,7 +81,7 @@ const EditDataComponent = (props) => {
const
service
=
SERVICE_CHECK
[
type
];
const
postData
=
(
props
.
type
==
'phone'
?
{
?
{
countryCode
:
form
.
getFieldValue
(
'country'
),
phone
:
form
.
getFieldValue
(
'newPhone'
)
}
...
...
@@ -126,7 +125,7 @@ const EditDataComponent = (props) => {
[
styles
.
success
]:
pwdStatus
.
length
,
})
}
>
{
pwdStatus
.
length
?
<
CheckCircleOutlined
/>
:
<
CloseCircleOutlined
/>
}
</
span
>
密码长度8-20个字符
</
p
>
<
p
className=
{
styles
.
trim
}
>
<
p
className=
{
styles
.
trim
}
>
<
span
className=
{
classNames
({
[
styles
.
icon
]:
!
pwdStatus
.
trim
,
[
styles
.
success
]:
pwdStatus
.
trim
,
...
...
@@ -135,13 +134,13 @@ const EditDataComponent = (props) => {
</
span
>
密码不能包含空格
</
p
>
<
p
className=
{
styles
.
compact
}
>
<
p
className=
{
styles
.
compact
}
>
<
span
className=
{
classNames
({
[
styles
.
icon
]:
!
pwdStatus
.
compact
,
[
styles
.
success
]:
pwdStatus
.
compact
,
})
}
>
{
pwdStatus
.
compact
?
<
CheckCircleOutlined
/>
:
<
CloseCircleOutlined
/>
}
</
span
>
</
span
>
密码必须包含大小写、小写字母和数字
</
p
>
</
div
>
...
...
@@ -223,7 +222,7 @@ const EditDataComponent = (props) => {
}
</
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
14
}
>
<
Form
.
Item
...
...
@@ -236,7 +235,7 @@ const EditDataComponent = (props) => {
<
Input
disabled=
{
!
inputCanEdit
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
.
Item
>
<
Form
.
Item
label=
"验证码"
>
...
...
@@ -263,4 +262,4 @@ const EditDataComponent = (props) => {
)
}
export
default
EditDataComponent
\ No newline at end of file
export
default
EditDataComponent
src/pages/accountSetting/components/TypeVerify/index.less
View file @
917e826b
...
...
@@ -5,12 +5,14 @@
align-items: center;
background-color: #fff;
padding: 36px 24px;
width: 610px;
height: 156px;
width: 100%;
overflow: hidden;
.infos {
display: flex;
flex-direction: row;
align-items: center;
.image {
margin-right: 22px;
...
...
@@ -27,7 +29,7 @@
line-height: 24px;
margin-bottom: 16px;
}
.tips {
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
...
...
@@ -35,14 +37,14 @@
color: #42526E;
line-height: 22px;
margin-bottom: 0;
}
}
}
.controls {
width: 90px;
text-align: right;
// cursor: pointer;
}
}
\ No newline at end of file
}
src/pages/accountSetting/components/VerifyPanel/Panel/EmailVerifyPanel.tsx
View file @
917e826b
import
React
,
{
useState
,
useCallback
}
from
'react'
;
// import { SchemaForm } from '@formily/antd';
// import { SchemaForm } from '@formily/antd';
import
{
Form
,
Input
,
Button
,
Row
,
Col
,
message
}
from
'antd'
;
import
SafeVerification
from
'../../SafeVerification'
;
import
TypeForHeader
from
'../../TypeForHeader'
;
...
...
@@ -129,7 +129,7 @@ const EmailVerifyPanel = (props) => {
}
{
visible
?
<>
?
<>
<
EditDataComponent
type=
{
pageType
}
form=
{
form
}
/>
<
Form
.
Item
{
...
tailLayout
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
...
...
@@ -144,4 +144,4 @@ const EmailVerifyPanel = (props) => {
)
}
export
default
EmailVerifyPanel
;
\ No newline at end of file
export
default
EmailVerifyPanel
;
src/pages/accountSetting/components/VerifyPanel/Panel/PaycodeVerifyPanel.tsx
View file @
917e826b
import
React
,
{
useState
}
from
'react'
;
// import { SchemaForm } from '@formily/antd';
// import { SchemaForm } from '@formily/antd';
import
{
Form
,
Input
,
Button
,
Row
,
Col
,
message
}
from
'antd'
;
import
SafeVerification
from
'../../SafeVerification'
;
import
EditDataComponent
from
'../../EditDataComponent'
;
...
...
@@ -7,6 +7,7 @@ import { PublicApi } from '@/services/api';
import
{
history
}
from
'umi'
import
{
encryptedByAES
}
from
'@/utils/cryptoAes'
const
layout
=
{
labelCol
:
{
span
:
3
},
wrapperCol
:
{
span
:
13
},
...
...
@@ -18,7 +19,7 @@ const tailLayout = {
interface
IProps
{
// 当前页面是属于 修改密码还是修改邮箱,还是修改手机
pageType
:
string
,
pageType
:
string
,
}
const
PaycodeVerifyPanel
:
React
.
FC
<
IProps
>
=
(
props
)
=>
{
...
...
@@ -85,7 +86,7 @@ const PaycodeVerifyPanel: React.FC<IProps> = (props) => {
form=
{
form
}
onFinish=
{
handleFinish
}
>
{
!
visible
?
<>
...
...
@@ -110,7 +111,7 @@ const PaycodeVerifyPanel: React.FC<IProps> = (props) => {
}
{
visible
?
<>
?
<>
<
EditDataComponent
type=
{
pageType
}
form=
{
form
}
/>
<
Form
.
Item
{
...
tailLayout
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
...
...
@@ -126,4 +127,4 @@ const PaycodeVerifyPanel: React.FC<IProps> = (props) => {
)
}
export
default
PaycodeVerifyPanel
;
\ No newline at end of file
export
default
PaycodeVerifyPanel
;
src/pages/accountSetting/components/VerifyPanel/Panel/PhoneVerifyPanel.tsx
View file @
917e826b
import
React
,
{
useCallback
,
useState
}
from
'react'
;
// import { SchemaForm } from '@formily/antd';
// import { SchemaForm } from '@formily/antd';
import
{
Form
,
Input
,
Button
,
Row
,
Col
,
message
}
from
'antd'
;
import
SafeVerification
from
'../../SafeVerification'
;
import
TypeForHeader
from
'../../TypeForHeader'
;
...
...
@@ -21,7 +21,7 @@ const tailLayout = {
interface
IProps
{
phone
:
string
,
// 当前页面是属于 修改密码还是修改邮箱,还是修改手机
pageType
:
string
,
pageType
:
string
,
}
const
PhoneVerifyPanel
:
React
.
FC
<
IProps
>
=
(
props
)
=>
{
...
...
@@ -129,11 +129,9 @@ const PhoneVerifyPanel: React.FC<IProps> = (props) => {
</>
:
null
}
{
visible
?
<>
?
<>
<
EditDataComponent
type=
{
pageType
}
form=
{
form
}
/>
<
Form
.
Item
{
...
tailLayout
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
...
...
@@ -143,10 +141,10 @@ const PhoneVerifyPanel: React.FC<IProps> = (props) => {
</>
:
null
}
</
Form
>
</
div
>
)
}
export
default
PhoneVerifyPanel
;
\ No newline at end of file
export
default
PhoneVerifyPanel
;
src/pages/accountSetting/components/VerifyPanel/Panel/ResetPayCode.tsx
View file @
917e826b
...
...
@@ -5,7 +5,7 @@ import GetCaptchaCode from '../../GetCaptchaCode';
import
SafeVerification
from
'../../SafeVerification'
;
import
TypeForHeader
from
'../../TypeForHeader'
;
import
{
history
}
from
'umi'
import
{
encryptedByAES
}
from
'@/utils/cryptoAes'
const
layout
=
{
labelCol
:
{
span
:
3
},
wrapperCol
:
{
span
:
13
},
...
...
@@ -18,7 +18,7 @@ const tailLayout = {
interface
IProps
{
phone
:
string
,
// 当前页面是属于 修改密码还是修改邮箱,还是修改手机
pageType
:
string
,
pageType
:
string
,
}
const
ResetPayCode
:
React
.
FC
<
IProps
>
=
(
props
)
=>
{
...
...
@@ -27,7 +27,7 @@ const ResetPayCode: React.FC<IProps> = (props) => {
const
{
phone
,
pageType
}
=
props
;
const
onFinish
=
(
values
)
=>
{
const
postData
=
{
payPassword
:
values
.
password
payPassword
:
encryptedByAES
(
values
.
password
)
}
// /member/security/pay/update
const
service
=
PublicApi
.
postMemberSecurityPayUpdate
;
...
...
@@ -158,7 +158,7 @@ const ResetPayCode: React.FC<IProps> = (props) => {
}
{
visible
?
<>
?
<>
{
renderPwd
()
}
...
...
@@ -170,10 +170,10 @@ const ResetPayCode: React.FC<IProps> = (props) => {
</>
:
null
}
</
Form
>
</
div
>
)
}
export
default
ResetPayCode
\ No newline at end of file
export
default
ResetPayCode
src/pages/accountSetting/index.tsx
View file @
917e826b
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Card
}
from
'antd'
;
import
{
Row
,
Col
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
TypeVerify
from
'./components/TypeVerify'
;
import
styles
from
'./index.less'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
getData
=
async
()
=>
{
...
...
@@ -22,26 +21,27 @@ const AccountSetting = () => {
const
TYPES
=
[
'loginPwd'
,
'email'
,
'phone'
,
'paycode'
]
return
(
<
PageHeaderWrapper
>
<
div
className=
{
styles
.
page
}
>
<
div
>
<
Row
gutter=
{
[
24
,
24
]
}
>
{
TYPES
.
map
((
item
)
=>
{
return
(
<
div
className=
{
styles
.
item
}
key=
{
item
}
>
<
TypeVerify
type=
{
item
}
phone=
{
account
.
phone
}
email=
{
account
.
email
}
<
Col
xxl=
{
12
}
xl=
{
12
}
lg=
{
24
}
md=
{
24
}
sm=
{
24
}
xs=
{
24
}
key=
{
item
}
>
<
TypeVerify
type=
{
item
}
phone=
{
account
.
phone
}
email=
{
account
.
email
}
paycode=
{
account
.
hasPayPassword
}
/>
</
div
>
</
Col
>
)
})
}
</
Row
>
</
div
>
</
PageHeaderWrapper
>
)
}
export
default
AccountSetting
;
\ No newline at end of file
export
default
AccountSetting
;
src/pages/handling/assign/processStock/index.tsx
View file @
917e826b
...
...
@@ -60,7 +60,7 @@ enum OuterAndInnerStatus {
/**
* 待确认物流单
*/
pending_confirm_logistics
=
'
待确认物流单
'
,
pending_confirm_logistics
=
'
4_17
'
,
/**
* 待确认发货
*/
...
...
@@ -174,8 +174,8 @@ const processStock: React.FC<{}> = () => {
<
a
onClick=
{
()
=>
handleVisible
(
record
.
id
)
}
>
审核
</
a
>
</
Popconfirm
>
),
[
OuterAndInnerStatus
.
pending_add_logistics
]:
<
Link
to
=
{
`
${
ADD_LOGISTICS_PATH
}
`
}
>
新增
<
/Link>
,
[
OuterAndInnerStatus
.
pending_confirm_logistics
]:
<
a
>
查看
<
/a
>
,
[
OuterAndInnerStatus
.
pending_add_logistics
]:
<
Link
to
=
{
`
${
ADD_LOGISTICS_PATH
}
?createType=3&shipmentOrderId=
${
record
.
deliveryId
}
&shipmentOrderCode=
${
record
.
deliveryNo
}
&relevanceOrderId=
${
record
.
id
}
`
}
>
新增物流单
<
/Link>
,
[
OuterAndInnerStatus
.
pending_confirm_logistics
]:
<
Link
to
=
{
`
${
ADD_LOGISTICS_PATH
}
?createType=3&shipmentOrderId=
${
record
.
deliveryId
}
&shipmentOrderCode=
${
record
.
deliveryNo
}
&relevanceOrderId=
${
record
.
id
}
&isPreview=1`
}
>
查看物流单
<
/Link
>
,
[
OuterAndInnerStatus
.
pending_confirm_deliver
]:
<
Link
to
=
{
`
${
PENDING_DELIVERD_PATH
}
/detail?id=
${
record
.
id
}
`
}
>
发货
<
/Link>
,
[
OuterAndInnerStatus
.
pending_add_process_in_warehouse
]:
(
<
Link
...
...
@@ -201,7 +201,7 @@ const processStock: React.FC<{}> = () => {
[
OuterAndInnerStatus
.
pending_confirm_receive
]:
<
Link
to
=
{
`
${
ASSIGN_PENDING_RECEIVE
}
/detail?id=
${
record
.
id
}
`
}
>
收货
<
/Link>
,
[
OuterAndInnerStatus
.
pending_confirm_receipt
]:
<
Link
to
=
{
`
${
PENDING_RECEIPT_PATH
}
/detail?id=
${
record
.
id
}
`
}
>
确认回单
<
/Link
>
}
return
MAP
[
`
${
outerStatus
}
_
${
innerStatus
}
`
]
||
MAP
[
record
.
innerStatusName
]
return
MAP
[
`
${
outerStatus
}
_
${
innerStatus
}
`
]
}
}
]
...
...
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