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
be54f5c6
Commit
be54f5c6
authored
Dec 07, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 对接e账户个人认证,处理商品图片上传六张后编辑图片异常问题
parent
6e37872e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
312 additions
and
42 deletions
+312
-42
Phone.tsx
src/components/NiceForm/components/Phone.tsx
+3
-2
classAndProperty.ts
src/locales/zh-CN/classAndProperty.ts
+1
-0
repositories.ts
src/locales/zh-CN/repositories.ts
+1
-1
productImageForm.tsx
...s/commodity/products/addProductsItem/productImageForm.tsx
+14
-6
index.tsx
.../payandSettle/eAccountApprove/components/header/index.tsx
+7
-8
index.tsx
...ayandSettle/eAccountApprove/components/personal/index.tsx
+21
-8
index.tsx
...ettle/eAccountApprove/components/personalFinish/index.tsx
+0
-0
index.tsx
...s/payandSettle/eAccountApprove/components/phone/index.tsx
+68
-0
constant.tsx
src/pages/payandSettle/eAccountApprove/constant.tsx
+15
-3
useEDetail.tsx
...pages/payandSettle/eAccountApprove/effects/useEDetail.tsx
+2
-2
index.tsx
src/pages/payandSettle/eAccountApprove/index.tsx
+13
-4
modal.ts
src/pages/payandSettle/eAccountApprove/schema/modal.ts
+156
-0
index.tsx
src/pages/repositories/schema/index.tsx
+8
-6
index.tsx
src/pages/transaction/saleOrder/index.tsx
+1
-1
request.ts
src/utils/request.ts
+2
-1
No files found.
src/components/NiceForm/components/Phone.tsx
View file @
be54f5c6
...
@@ -31,7 +31,7 @@ const Phone = (props) => {
...
@@ -31,7 +31,7 @@ const Phone = (props) => {
delay
:
1
*
1000
delay
:
1
*
1000
})
})
const
{
smsFn
,
...
componentProps
}
=
schema
.
getExtendsComponentProps
()
||
{}
const
{
smsFn
,
btnSize
=
'large'
,
inputSize
=
'large'
,
...
componentProps
}
=
schema
.
getExtendsComponentProps
()
||
{}
const
[
loading
,
setLoading
]
=
useState
(
false
)
const
[
loading
,
setLoading
]
=
useState
(
false
)
const
[
isShowValidate
,
setIsShowValidate
]
=
useState
(
false
)
const
[
isShowValidate
,
setIsShowValidate
]
=
useState
(
false
)
...
@@ -186,11 +186,12 @@ const Phone = (props) => {
...
@@ -186,11 +186,12 @@ const Phone = (props) => {
<
Input
<
Input
value=
{
value
||
''
}
value=
{
value
||
''
}
onChange=
{
e
=>
props
.
mutators
.
change
(
e
.
target
.
value
)
}
onChange=
{
e
=>
props
.
mutators
.
change
(
e
.
target
.
value
)
}
size=
{
inputSize
}
{
...
componentProps
}
{
...
componentProps
}
/>
/>
</
Col
>
</
Col
>
<
Col
style=
{
{
marginLeft
:
8
}
}
>
<
Col
style=
{
{
marginLeft
:
8
}
}
>
<
Button
disabled=
{
isActive
}
style=
{
{
minWidth
:
110
,
marginLeft
:
8
}
}
loading=
{
loading
}
size=
'large'
onClick=
{
handleClickSms
}
>
{
text
}
</
Button
>
<
Button
disabled=
{
isActive
}
style=
{
{
minWidth
:
110
,
marginLeft
:
8
}
}
loading=
{
loading
}
size=
{
btnSize
}
onClick=
{
handleClickSms
}
>
{
text
}
</
Button
>
</
Col
>
</
Col
>
<
Modal
<
Modal
title=
'滑动验证'
title=
'滑动验证'
...
...
src/locales/zh-CN/classAndProperty.ts
View file @
be54f5c6
...
@@ -189,6 +189,7 @@ export default {
...
@@ -189,6 +189,7 @@ export default {
'classAndProperty.class.classSchema.category.name'
:
'对应平台品类'
,
'classAndProperty.class.classSchema.category.name'
:
'对应平台品类'
,
'classAndProperty.class.classSchema.sort'
:
'品类排序'
,
'classAndProperty.class.classSchema.sort'
:
'品类排序'
,
'classAndProperty.class.classSchema.sort.placeholder'
:
'请输入品类排序'
,
'classAndProperty.class.classSchema.sort.placeholder'
:
'请输入品类排序'
,
'classAndProperty.class.classSchema.sort.placeholder1'
:
'请输入排序数值'
,
'classAndProperty.propertyValue.syncSchema.attributeGroupName'
:
'属性组名'
,
'classAndProperty.propertyValue.syncSchema.attributeGroupName'
:
'属性组名'
,
'classAndProperty.propertyValue.syncSchema.attributeName'
:
'属性名称'
,
'classAndProperty.propertyValue.syncSchema.attributeName'
:
'属性名称'
,
...
...
src/locales/zh-CN/repositories.ts
View file @
be54f5c6
...
@@ -181,7 +181,7 @@ export default {
...
@@ -181,7 +181,7 @@ export default {
'repositories.schema.repositDetailSchema.goodsName.default'
:
'暂无'
,
'repositories.schema.repositDetailSchema.goodsName.default'
:
'暂无'
,
'repositories.schema.repositDetailSchema.noSUBMIT3'
:
'当前仓货品库存'
,
'repositories.schema.repositDetailSchema.noSUBMIT3'
:
'当前仓货品库存'
,
'repositories.schema.repositDetailSchema.inventory'
:
'分配仓位库存'
,
'repositories.schema.repositDetailSchema.inventory'
:
'分配仓位库存'
,
'repositories.schema.repositDetailSchema.inventory.message.1'
:
'仓位库存数值
已超出最大限度
'
,
'repositories.schema.repositDetailSchema.inventory.message.1'
:
'仓位库存数值
不超过八位
'
,
'repositories.schema.repositDetailSchema.inventory.message.2'
:
'仓位库存数值仅限三位小数'
,
'repositories.schema.repositDetailSchema.inventory.message.2'
:
'仓位库存数值仅限三位小数'
,
'repositories.schema.repositDetailSchema.inventoryDeductWay'
:
'库存扣减方式'
,
'repositories.schema.repositDetailSchema.inventoryDeductWay'
:
'库存扣减方式'
,
'repositories.schema.repositDetailSchema.inventoryDeductWay.1'
:
'按仓位随机扣减'
,
'repositories.schema.repositDetailSchema.inventoryDeductWay.1'
:
'按仓位随机扣减'
,
...
...
src/pages/commodity/products/addProductsItem/productImageForm.tsx
View file @
be54f5c6
...
@@ -3,7 +3,7 @@ import { history, useIntl } from 'umi'
...
@@ -3,7 +3,7 @@ import { history, useIntl } from 'umi'
import
{
message
,
Modal
,
Row
,
Col
,
Alert
,
Upload
,
Radio
}
from
'antd'
import
{
message
,
Modal
,
Row
,
Col
,
Alert
,
Upload
,
Radio
}
from
'antd'
import
{
EditOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
import
{
EditOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
import
styles
from
'./index.less'
import
styles
from
'./index.less'
import
{
Upload
File
}
from
'antd/lib/upload/interface'
;
import
{
Rc
File
}
from
'antd/lib/upload/interface'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
import
{
UPLOAD_TYPE
}
from
'@/constants'
import
ImgCrop
from
'antd-img-crop'
;
import
ImgCrop
from
'antd-img-crop'
;
...
@@ -151,7 +151,13 @@ const ProductImageForm: React.FC<{}> = (props) => {
...
@@ -151,7 +151,13 @@ const ProductImageForm: React.FC<{}> = (props) => {
});
});
}
}
const
beforeUpload
=
(
file
:
UploadFile
)
=>
{
const
beforeUpload
=
(
file
:
RcFile
,
fileLen
:
number
)
=>
{
const
selectUuid
=
uploadFileSelectRef
.
current
.
uid
// 编辑图片会多占用一张
if
(
fileLen
>=
6
&&
!
selectUuid
)
{
message
.
error
(
'最多上次六张图片'
)
return
false
}
const
isJpgOrPng
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
||
file
.
type
===
'image/jpg'
;
const
isJpgOrPng
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
||
file
.
type
===
'image/jpg'
;
if
(
!
isJpgOrPng
)
{
if
(
!
isJpgOrPng
)
{
message
.
error
(
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.productImageForm.error.1'
}))
message
.
error
(
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.productImageForm.error.1'
}))
...
@@ -294,7 +300,7 @@ const ProductImageForm: React.FC<{}> = (props) => {
...
@@ -294,7 +300,7 @@ const ProductImageForm: React.FC<{}> = (props) => {
action=
"/api/file/file/upload"
action=
"/api/file/file/upload"
listType=
"picture-card"
listType=
"picture-card"
fileList=
{
item
.
commodityPic
}
fileList=
{
item
.
commodityPic
}
beforeUpload=
{
beforeUpload
}
beforeUpload=
{
(
f
)
=>
beforeUpload
(
f
,
item
.
commodityPic
.
length
)
}
onPreview=
{
handlePreview
}
onPreview=
{
handlePreview
}
onChange=
{
(
files
)
=>
handleChange
(
files
,
index
)
}
onChange=
{
(
files
)
=>
handleChange
(
files
,
index
)
}
onDownload=
{
(
file
)
=>
handlefileEdit
(
file
,
index
)
}
onDownload=
{
(
file
)
=>
handlefileEdit
(
file
,
index
)
}
...
@@ -303,7 +309,8 @@ const ProductImageForm: React.FC<{}> = (props) => {
...
@@ -303,7 +309,8 @@ const ProductImageForm: React.FC<{}> = (props) => {
className=
"uploadBox"
className=
"uploadBox"
headers=
{
{
token
}
}
headers=
{
{
token
}
}
>
>
{
item
.
commodityPic
.
length
>=
6
?
null
:
uploadButton
}
{
uploadButton
}
{
/* {item.commodityPic.length >= 6 ? null : uploadButton} */
}
</
Upload
>
</
Upload
>
</
ImgCrop
>
</
ImgCrop
>
</
div
>
</
div
>
...
@@ -329,7 +336,7 @@ const ProductImageForm: React.FC<{}> = (props) => {
...
@@ -329,7 +336,7 @@ const ProductImageForm: React.FC<{}> = (props) => {
id=
'uploadEle0'
id=
'uploadEle0'
listType=
"picture-card"
listType=
"picture-card"
fileList=
{
commonImageList
}
fileList=
{
commonImageList
}
beforeUpload=
{
beforeUpload
}
beforeUpload=
{
(
f
)
=>
beforeUpload
(
f
,
commonImageList
.
length
)
}
onPreview=
{
handlePreview
}
onPreview=
{
handlePreview
}
onChange=
{
(
files
)
=>
handleChange
(
files
,
0
)
}
//-1
onChange=
{
(
files
)
=>
handleChange
(
files
,
0
)
}
//-1
onDownload=
{
(
file
)
=>
handlefileEdit
(
file
,
0
)
}
onDownload=
{
(
file
)
=>
handlefileEdit
(
file
,
0
)
}
...
@@ -338,7 +345,8 @@ const ProductImageForm: React.FC<{}> = (props) => {
...
@@ -338,7 +345,8 @@ const ProductImageForm: React.FC<{}> = (props) => {
className=
"uploadBox"
className=
"uploadBox"
headers=
{
{
token
}
}
headers=
{
{
token
}
}
>
>
{
commonImageList
.
length
>=
6
?
null
:
uploadButton
}
{
uploadButton
}
{
/* {commonImageList.length >= 6 ? null : uploadButton} */
}
</
Upload
>
</
Upload
>
</
ImgCrop
>
</
ImgCrop
>
</
div
>
</
div
>
...
...
src/pages/payandSettle/eAccountApprove/components/header/index.tsx
View file @
be54f5c6
import
React
,
{
ReactNode
,
useEffect
,
useRef
,
useState
}
from
'react'
import
React
,
{
ReactNode
,
use
Context
,
use
Effect
,
useRef
,
useState
}
from
'react'
import
{
Row
,
Col
,
Skeleton
,
Anchor
}
from
'antd'
import
{
Row
,
Col
,
Skeleton
,
Anchor
}
from
'antd'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
ArrowLeftOutlined
}
from
'@ant-design/icons'
import
{
ArrowLeftOutlined
}
from
'@ant-design/icons'
import
style
from
'./index.less'
import
style
from
'./index.less'
import
{
useEDetail
}
from
'../../effects/useEDetail'
import
{
EDetailContext
}
from
'../../constant'
const
{
Link
}
=
Anchor
;
const
{
Link
}
=
Anchor
;
...
@@ -11,14 +13,10 @@ export interface ILink {
...
@@ -11,14 +13,10 @@ export interface ILink {
id
:
string
;
id
:
string
;
}
}
interface
BackFn
{
():
void
;
}
export
interface
EDetailHeaderProps
{
export
interface
EDetailHeaderProps
{
extraRight
?:
ReactNode
,
extraRight
?:
ReactNode
,
anchorList
?:
ILink
[],
anchorList
?:
ILink
[],
backLink
?:
string
|
boolean
|
BackFn
,
backLink
?:
any
,
title
:
string
,
title
:
string
,
}
}
...
@@ -31,7 +29,8 @@ const EDetailHeader: React.FC<EDetailHeaderProps> = ({
...
@@ -31,7 +29,8 @@ const EDetailHeader: React.FC<EDetailHeaderProps> = ({
backLink
,
backLink
,
title
title
})
=>
{
})
=>
{
// const isLoading = !!formContext.data
const
eDetailContext
=
useContext
(
EDetailContext
)
const
{
ctl
}
=
eDetailContext
const
flagRef
=
useRef
({
const
flagRef
=
useRef
({
flag
:
false
,
flag
:
false
,
...
@@ -75,7 +74,7 @@ const EDetailHeader: React.FC<EDetailHeaderProps> = ({
...
@@ -75,7 +74,7 @@ const EDetailHeader: React.FC<EDetailHeaderProps> = ({
}
}
const
handleBack
=
()
=>
{
const
handleBack
=
()
=>
{
typeof
backLink
===
'
string'
?
(
typeof
backLink
===
'function'
?
backLink
()
:
history
.
push
(
backLink
))
:
history
.
goBack
(
)
typeof
backLink
===
'
function'
?
backLink
()
:
(
typeof
backLink
===
'string'
?
history
.
push
(
backLink
)
:
history
.
goBack
()
)
}
}
return
(
return
(
...
...
src/pages/payandSettle/eAccountApprove/components/personal/index.tsx
View file @
be54f5c6
import
React
,
{
useContext
}
from
'react'
import
React
,
{
useContext
,
useState
}
from
'react'
import
{
Button
,
Col
,
Form
,
Input
,
Row
,
Select
}
from
'antd'
import
{
Button
,
Col
,
Form
,
Input
,
message
,
Row
,
Select
}
from
'antd'
import
MellowCard
from
'@/components/MellowCard'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
{
BIND_PHONE
,
EDetailContext
,
formItemLayout
,
prefixSelector
,
tailFormItemLayout
}
from
'../../constant'
;
import
{
BIND_PHONE
,
EDetailContext
,
formItemLayout
,
prefixSelector
,
tailFormItemLayout
}
from
'../../constant'
;
import
useCountDown
from
'@/utils/hooks'
;
import
useCountDown
from
'@/utils/hooks'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
import
{
postPayAllInPay
PersonalCrate
,
postPayAllInPaySendVerificationCod
e
}
from
'@/services/PayV2Api'
;
import
{
postPayAllInPay
BindPhone
,
postPayAllInPayPersonalCrate
,
postPayAllInPaySendVerificationCode
,
postPayAllInPaySetRealNam
e
}
from
'@/services/PayV2Api'
;
/** 个人 初始认证 */
/** 个人 初始认证 */
const
Personal
:
React
.
FC
<
{}
>
=
()
=>
{
const
Personal
:
React
.
FC
<
{}
>
=
()
=>
{
...
@@ -12,14 +12,27 @@ const Personal: React.FC<{}> = () => {
...
@@ -12,14 +12,27 @@ const Personal: React.FC<{}> = () => {
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
eDetailContext
=
useContext
(
EDetailContext
)
const
eDetailContext
=
useContext
(
EDetailContext
)
const
{
ctl
,
reloadFormData
}
=
eDetailContext
const
{
ctl
,
reloadFormData
}
=
eDetailContext
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
onFinish
=
async
(
values
:
any
)
=>
{
const
onFinish
=
async
(
values
:
any
)
=>
{
const
{
code
}
=
await
postPayAllInPayPersonalCrate
({...
values
})
setLoading
(
true
)
if
(
code
===
1000
)
{
// 绑定手机
const
p1
=
await
postPayAllInPayBindPhone
({
phone
:
values
.
phone
,
verificationCode
:
values
.
captcha
},
{
ctlType
:
'none'
})
// 实名认证
const
p2
=
await
postPayAllInPaySetRealName
({
name
:
values
.
name
,
cardType
:
values
.
cardType
,
cardNo
:
values
.
cardNo
,
phone
:
values
.
phone
},
{
ctlType
:
'none'
})
// 提交
const
p3
=
await
postPayAllInPayPersonalCrate
({...
values
},
{
ctlType
:
"none"
})
Promise
.
all
([
p1
,
p2
,
p3
]).
then
(
res
=>
{
if
(
res
.
every
(
item
=>
item
[
'code'
]
===
1000
))
{
reloadFormData
()
reloadFormData
()
message
.
success
(
'操作成功'
)
}
else
{
message
.
error
(
'接口请求异常'
)
}
setLoading
(
false
)
})
}
}
console
.
log
(
'Received values of form: '
,
values
);
};
const
{
text
,
isActive
,
start
}
=
useCountDown
({
const
{
text
,
isActive
,
start
}
=
useCountDown
({
maxTime
:
60
,
maxTime
:
60
,
...
@@ -143,7 +156,7 @@ const Personal: React.FC<{}> = () => {
...
@@ -143,7 +156,7 @@ const Personal: React.FC<{}> = () => {
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
{
...
tailFormItemLayout
}
>
<
Form
.
Item
{
...
tailFormItemLayout
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
>
提交
提交
</
Button
>
</
Button
>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
src/pages/payandSettle/eAccountApprove/components/personalFinish/index.tsx
View file @
be54f5c6
This diff is collapsed.
Click to expand it.
src/pages/payandSettle/eAccountApprove/components/phone/index.tsx
0 → 100644
View file @
be54f5c6
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'react'
import
{
Row
,
Input
,
Col
,
Button
,
Result
,
message
,
Modal
}
from
'antd'
;
import
useCountDown
from
'@/utils/hooks'
;
import
{
postPayAllInPaySendVerificationCode
}
from
'@/services/PayV2Api'
;
import
{
UNBIND_PHONE
}
from
'../../constant'
;
/**
* e账户认证 发送短信验证码
* @param props
* @returns
*/
const
PhoneCode
=
(
props
)
=>
{
const
{
value
,
form
,
schema
}
=
props
const
[
loading
,
setLoading
]
=
useState
(
false
)
const
{
text
,
isActive
,
start
}
=
useCountDown
({
maxTime
:
60
,
minTime
:
0
,
initText
:
'获取验证码'
,
onEnd
:
()
=>
{
setLoading
(
false
)
},
decayRate
:
1
,
delay
:
1
*
1000
})
// type 9绑定 6解绑
const
{
btnSize
=
'large'
,
inputSize
=
'large'
,
type
,
...
componentProps
}
=
schema
.
getExtendsComponentProps
()
||
{}
const
handleClickSms
=
async
()
=>
{
// 短信正在读秒中
if
(
isActive
)
{
return
false
}
setLoading
(
true
)
form
.
validate
(
'phone'
).
then
(
result
=>
{
console
.
log
(
result
,
type
)
// 发送验证码
const
phone
=
form
.
getFieldValue
(
'phone'
)
postPayAllInPaySendVerificationCode
({
phone
,
verificationCodeType
:
type
}).
then
(
res
=>
{
res
.
code
===
1000
&&
start
()
})
})
}
return
(
<
Row
style=
{
{
width
:
'100%'
}
}
>
<
Col
flex=
{
1
}
>
<
Input
value=
{
value
||
''
}
onChange=
{
e
=>
props
.
mutators
.
change
(
e
.
target
.
value
)
}
size=
{
inputSize
}
{
...
componentProps
}
/>
</
Col
>
<
Col
style=
{
{
marginLeft
:
8
}
}
>
<
Button
disabled=
{
isActive
}
style=
{
{
minWidth
:
110
,
marginLeft
:
8
}
}
loading=
{
loading
}
size=
{
btnSize
}
onClick=
{
handleClickSms
}
>
{
text
}
</
Button
>
</
Col
>
</
Row
>
)
}
PhoneCode
.
defaultProps
=
{}
PhoneCode
.
isFieldComponent
=
true
;
export
default
PhoneCode
src/pages/payandSettle/eAccountApprove/constant.tsx
View file @
be54f5c6
import
{
createContext
}
from
'react'
;
import
{
createContext
}
from
'react'
;
import
{
Form
,
Select
}
from
'antd'
;
import
{
Form
,
Select
}
from
'antd'
;
import
{
getManageCountryAreaGetTelCode
}
from
'@/services/ManageV2Api'
;
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
/**
/**
...
@@ -63,10 +64,21 @@ export const tailFormItemLayoutCompany = {
...
@@ -63,10 +64,21 @@ export const tailFormItemLayoutCompany = {
},
},
};
};
export
const
prefixSelector
=
(
// 获取手机code
export
const
fetchTelCode
=
async
()
=>
{
const
{
data
=
[]
}
=
await
getManageCountryAreaGetTelCode
();
return
data
;
};
export
const
prefixSelector
=
async
()
=>
{
const
options
=
await
fetchTelCode
()
return
(
<
Form
.
Item
name=
"prefix"
noStyle
>
<
Form
.
Item
name=
"prefix"
noStyle
>
<
Select
style=
{
{
width
:
70
}
}
>
<
Select
style=
{
{
width
:
70
}
}
>
<
Option
value=
"86"
>
+86
</
Option
>
{
options
.
map
(
item
=>
<
Option
value=
{
item
}
>
{
item
}
</
Option
>)
}
</
Select
>
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
);
)
};
src/pages/payandSettle/eAccountApprove/effects/useEDetail.tsx
View file @
be54f5c6
import
{
getPayAllInPayGetAuthMemberInfo
,
postPayAllInPayCreateMember
,
postPayAllInPayGetMemberInfo
}
from
'@/services/PayV2Api'
;
import
{
getPayAllInPayGetAuthMemberInfo
,
postPayAllInPayCreateMember
,
postPayAllInPayGetMemberInfo
,
PostPayAllInPayGetMemberInfoResponse
}
from
'@/services/PayV2Api'
;
import
{
getAuth
}
from
'@/utils/auth'
;
import
{
getAuth
}
from
'@/utils/auth'
;
import
{
message
}
from
'antd'
;
import
{
message
}
from
'antd'
;
import
{
useCallback
,
useState
,
useEffect
}
from
'react'
import
{
useCallback
,
useState
,
useEffect
}
from
'react'
...
@@ -20,7 +20,7 @@ import { useCallback, useState, useEffect } from 'react'
...
@@ -20,7 +20,7 @@ import { useCallback, useState, useEffect } from 'react'
export
const
useEDetail
=
()
=>
{
export
const
useEDetail
=
()
=>
{
const
{
memberRoleType
}
=
getAuth
()
||
{}
const
{
memberRoleType
}
=
getAuth
()
||
{}
/** 详情数据 null从未认证*/
/** 详情数据 null从未认证*/
const
[
formData
,
setFormData
]
=
useState
<
any
>
(
null
)
const
[
formData
,
setFormData
]
=
useState
<
PostPayAllInPayGetMemberInfoResponse
>
(
null
)
/** 企业/个人 */
/** 企业/个人 */
const
[
type
,
setType
]
=
useState
<
'company'
|
'personal'
>
(
MEMBER_TYPE
[
memberRoleType
])
const
[
type
,
setType
]
=
useState
<
'company'
|
'personal'
>
(
MEMBER_TYPE
[
memberRoleType
])
/** 是否需要完善 */
/** 是否需要完善 */
...
...
src/pages/payandSettle/eAccountApprove/index.tsx
View file @
be54f5c6
...
@@ -7,6 +7,8 @@ import { useEDetail } from './effects/useEDetail'
...
@@ -7,6 +7,8 @@ import { useEDetail } from './effects/useEDetail'
import
PersonalFinish
from
'./components/personalFinish'
import
PersonalFinish
from
'./components/personalFinish'
import
Company
from
'./components/company'
import
Company
from
'./components/company'
import
CompanyFinish
from
'./components/companyFinish'
import
CompanyFinish
from
'./components/companyFinish'
import
PreLoading
from
'@/components/PreLoading'
import
{
Modal
}
from
'antd'
const
EAccountApprove
:
React
.
FC
<
{}
>
=
()
=>
{
const
EAccountApprove
:
React
.
FC
<
{}
>
=
()
=>
{
...
@@ -14,10 +16,8 @@ const EAccountApprove: React.FC<{}> = () => {
...
@@ -14,10 +16,8 @@ const EAccountApprove: React.FC<{}> = () => {
const
{
const
{
type
,
type
,
perfection
,
finish
,
backed
,
backed
,
showAnchor
,
ctl
,
data
}
=
formContext
data
}
=
formContext
const
personalLinkList
=
[
const
personalLinkList
=
[
...
@@ -31,18 +31,27 @@ const EAccountApprove: React.FC<{}> = () => {
...
@@ -31,18 +31,27 @@ const EAccountApprove: React.FC<{}> = () => {
{
title
:
'电子协议'
,
id
:
'electricInfo'
},
{
title
:
'电子协议'
,
id
:
'electricInfo'
},
]
]
const
handleBack
=
()
=>
{
ctl
.
setPerfection
(
false
)
ctl
.
setFinish
(
false
)
ctl
.
setBacked
(
false
)
}
return
(
return
(
<
div
>
<
div
>
<
EDetailContext
.
Provider
value=
{
formContext
}
>
<
EDetailContext
.
Provider
value=
{
formContext
}
>
<
EDetailHeader
<
EDetailHeader
title=
"通联账户"
title=
"通联账户"
anchorList=
{
finish
?
(
type
===
"personal"
?
personalLinkList
:
companyLinkList
)
:
[]
}
anchorList=
{
data
?.
bankNo
?
(
type
===
"personal"
?
personalLinkList
:
companyLinkList
)
:
[]
}
backLink=
{
backed
?
handleBack
:
false
}
/>
/>
<
PreLoading
loading=
{
!
data
}
active
paragraph=
{
{
rows
:
6
}
}
>
<
div
className=
{
styles
.
wrapper
}
>
<
div
className=
{
styles
.
wrapper
}
>
{
{
type
===
'personal'
?
(
data
?.
name
?
<
PersonalFinish
/>
:
<
Personal
/>)
:
(
data
?
<
CompanyFinish
/>
:
<
Company
/>)
type
===
'personal'
?
(
data
?.
name
?
<
PersonalFinish
/>
:
<
Personal
/>)
:
(
data
?
<
CompanyFinish
/>
:
<
Company
/>)
}
}
</
div
>
</
div
>
</
PreLoading
>
</
EDetailContext
.
Provider
>
</
EDetailContext
.
Provider
>
</
div
>
</
div
>
)
)
...
...
src/pages/payandSettle/eAccountApprove/schema/modal.ts
0 → 100644
View file @
be54f5c6
import
{
PATTERN_MAPS
}
from
"@/constants/regExp"
;
export
const
bindSchema
=
{
type
:
'object'
,
properties
:
{
NO_SUBMIT
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelAlign
:
'top'
,
},
properties
:
{
NO_SUBMIT_LAYOUT_PHONE
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
grid
:
true
,
label
:
'手机号'
,
columns
:
6
,
enableSafeWidth
:
false
,
className
:
'noMarbottom'
,
required
:
true
,
},
properties
:
{
areaCode
:
{
type
:
'string'
,
enum
:
[],
"x-component-props"
:
{
placeholder
:
'+86'
},
"x-mega-props"
:
{
span
:
1
,
},
"x-rules"
:
[
{
required
:
true
,
message
:
'请选择区号'
}
]
},
phone
:
{
type
:
'number'
,
"x-mega-props"
:
{
span
:
5
},
"x-rules"
:
[
{
pattern
:
PATTERN_MAPS
.
phone
,
message
:
'请输入正确的手机号'
},
{
required
:
true
,
message
:
'请输入手机号'
}
],
"x-component-props"
:
{
placeholder
:
'输入你的手机号码'
,
style
:
{
width
:
'100%'
}
}
}
}
},
verificationCode
:
{
type
:
'string'
,
"x-component"
:
'PhoneCode'
,
"x-rules"
:
[
{
required
:
true
,
message
:
'请填写验证码'
},
// {
// pattern: /^\d{6}$/,
// message: '请输入正确的6位验证码'
// }
],
"x-component-props"
:
{
btnSize
:
'middle'
,
inputSize
:
'middle'
,
placeholder
:
'请输入短信验证码'
,
type
:
null
}
},
}
}
}
}
export
const
unbindSchema
=
{
type
:
'object'
,
properties
:
{
NO_SUBMIT
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelAlign
:
'top'
,
},
properties
:
{
NO_SUBMIT_LAYOUT_PHONE
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
grid
:
true
,
label
:
'手机号'
,
columns
:
6
,
enableSafeWidth
:
false
,
className
:
'noMarbottom'
,
required
:
true
,
},
properties
:
{
phone
:
{
type
:
'number'
,
"x-mega-props"
:
{
span
:
6
},
"x-rules"
:
[
{
pattern
:
PATTERN_MAPS
.
phone
,
message
:
'请输入正确的手机号'
},
{
required
:
true
,
message
:
'请输入手机号'
}
],
"x-component-props"
:
{
placeholder
:
'输入你的手机号码'
,
style
:
{
width
:
'100%'
}
}
}
}
},
verificationCode
:
{
type
:
'string'
,
"x-component"
:
'PhoneCode'
,
"x-rules"
:
[
{
required
:
true
,
message
:
'请填写验证码'
},
// {
// pattern: /^\d{6}$/,
// message: '请输入正确的6位验证码'
// }
],
"x-component-props"
:
{
btnSize
:
'middle'
,
inputSize
:
'middle'
,
placeholder
:
'请输入短信验证码'
,
type
:
null
}
},
}
}
}
}
src/pages/repositories/schema/index.tsx
View file @
be54f5c6
...
@@ -512,9 +512,10 @@ export const repositDetailSchema: ISchema = padRequiredMessage({
...
@@ -512,9 +512,10 @@ export const repositDetailSchema: ISchema = padRequiredMessage({
title
:
getIntl
().
formatMessage
({
id
:
'repositories.schema.repositDetailSchema.inventory'
}),
title
:
getIntl
().
formatMessage
({
id
:
'repositories.schema.repositDetailSchema.inventory'
}),
"x-rules"
:
[
"x-rules"
:
[
{
{
validator
:
value
=>
{
// validator: value => {
return
value
>
Number
.
MAX_SAFE_INTEGER
// return value > Number.MAX_SAFE_INTEGER
},
// },
pattern
:
/^
[
0-9
]{1,8}
$/
,
message
:
getIntl
().
formatMessage
({
id
:
'repositories.schema.repositDetailSchema.inventory.message.1'
}),
message
:
getIntl
().
formatMessage
({
id
:
'repositories.schema.repositDetailSchema.inventory.message.1'
}),
},
},
{
{
...
@@ -684,9 +685,10 @@ export const batchRepositDetailSchema: ISchema = padRequiredMessage({
...
@@ -684,9 +685,10 @@ export const batchRepositDetailSchema: ISchema = padRequiredMessage({
title
:
getIntl
().
formatMessage
({
id
:
'repositories.schema.batchRepositDetailSchema.inventory'
}),
title
:
getIntl
().
formatMessage
({
id
:
'repositories.schema.batchRepositDetailSchema.inventory'
}),
"x-rules"
:
[
"x-rules"
:
[
{
{
validator
:
value
=>
{
// validator: value => {
return
value
>
Number
.
MAX_SAFE_INTEGER
// return value > Number.MAX_SAFE_INTEGER
},
// },
pattern
:
/^
[
0-9
]{1,8}
$/
,
message
:
getIntl
().
formatMessage
({
id
:
'repositories.schema.batchRepositDetailSchema.inventory.message.1'
}),
message
:
getIntl
().
formatMessage
({
id
:
'repositories.schema.batchRepositDetailSchema.inventory.message.1'
}),
},
},
{
{
...
...
src/pages/transaction/saleOrder/index.tsx
View file @
be54f5c6
...
@@ -113,7 +113,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
...
@@ -113,7 +113,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
payModel
===
"web"
)
{
if
(
payModel
===
"web"
)
{
payForm
.
setFieldsValue
({
'payChart'
:
`/memberCenter/tranactionAbility/purchaseOrder/readyPayOrder/detail?id=
${
currentPayRef
.
current
.
orderId
}
`
})
payForm
.
setFieldsValue
({
'payChart'
:
`
${
window
.
location
.
origin
}
/memberCenter/tranactionAbility/purchaseOrder/readyPayOrder/detail?id=
${
currentPayRef
.
current
.
orderId
}
`
})
}
else
if
(
payModel
===
"app"
)
{
}
else
if
(
payModel
===
"app"
)
{
// 生成二维码
// 生成二维码
QRCode
.
toDataURL
(
JSON
.
stringify
({
path
:
'MycommodityDetails'
,
orderId
:
currentPayRef
.
current
.
orderId
})).
then
((
url
:
any
)
=>
{
QRCode
.
toDataURL
(
JSON
.
stringify
({
path
:
'MycommodityDetails'
,
orderId
:
currentPayRef
.
current
.
orderId
})).
then
((
url
:
any
)
=>
{
...
...
src/utils/request.ts
View file @
be54f5c6
...
@@ -80,13 +80,14 @@ const cache = {}
...
@@ -80,13 +80,14 @@ const cache = {}
// 请求拦截器
// 请求拦截器
baseRequest
.
interceptors
.
request
.
use
((
url
:
string
,
options
:
RequestOptionsInit
):
{
url
:
string
,
options
:
RequestOptionsInit
}
=>
{
baseRequest
.
interceptors
.
request
.
use
((
url
:
string
,
options
:
RequestOptionsInit
):
{
url
:
string
,
options
:
RequestOptionsInit
}
=>
{
// 判断是否有权限
// 判断是否有权限
const
{
userId
,
memberId
,
token
}
=
getCookieAuth
()
||
{}
const
{
userId
,
memberId
,
token
,
memberRoleId
}
=
getCookieAuth
()
||
{}
const
headers
:
any
=
{
const
headers
:
any
=
{
...
options
.
headers
...
options
.
headers
}
}
userId
&&
(
headers
.
userId
=
userId
)
userId
&&
(
headers
.
userId
=
userId
)
token
&&
(
headers
.
token
=
token
)
token
&&
(
headers
.
token
=
token
)
memberId
&&
(
headers
.
memberId
=
memberId
)
memberId
&&
(
headers
.
memberId
=
memberId
)
// memberRoleId && (headers.memberRoleId = memberRoleId)
options
.
paramsSerializer
=
params
=>
{
options
.
paramsSerializer
=
params
=>
{
return
qs
.
stringify
(
params
,
{
arrayFormat
:
'indices'
})
return
qs
.
stringify
(
params
,
{
arrayFormat
:
'indices'
})
...
...
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