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
ead61aee
Commit
ead61aee
authored
Aug 28, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复注册bug,新增采购订单
parent
afd9d15d
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
94 additions
and
7 deletions
+94
-7
tranactionRoute.ts
config/routes/tranactionRoute.ts
+14
-0
global.d.ts
src/global/config/global.d.ts
+1
-1
global.less
src/global/styles/global.less
+7
-0
useMethods.ts
src/hooks/useMethods.ts
+30
-0
menu.ts
src/locales/zh-CN/menu.ts
+2
-0
index.tsx
src/pages/transaction/purchaseOrder/index.tsx
+33
-0
index.less
src/pages/user/index.less
+0
-2
register.tsx
src/pages/user/register.tsx
+4
-1
index.ts
src/pages/user/schema/index.ts
+3
-3
No files found.
config/routes/tranactionRoute.ts
View file @
ead61aee
...
@@ -84,6 +84,20 @@ const TranactionRoute = {
...
@@ -84,6 +84,20 @@ const TranactionRoute = {
},
},
]
]
},
// 采购订单
{
path
:
'/memberCenter/tranactionAbility/purchaseOrder'
,
name
:
'purchaseOrder'
,
key
:
'purchaseOrder'
,
routes
:
[
{
path
:
'/memberCenter/tranactionAbility/purchaseOrder/orderList'
,
name
:
'purchaseOrderSearch'
,
key
:
'purchaseOrderSearch'
,
component
:
'@/pages/transaction/purchaseOrder'
},
]
}
}
]
]
...
...
src/global/config/global.d.ts
View file @
ead61aee
...
@@ -23,7 +23,7 @@ export interface ShopInfo {
...
@@ -23,7 +23,7 @@ export interface ShopInfo {
type
:
number
;
type
:
number
;
environment
:
number
;
environment
:
number
;
logoUrl
:
string
;
logoUrl
:
string
;
describe
:
string
;
describe
?:
any
;
state
:
number
;
state
:
number
;
url
:
string
;
url
:
string
;
}
}
...
...
src/global/styles/global.less
View file @
ead61aee
...
@@ -275,4 +275,10 @@ h6 {
...
@@ -275,4 +275,10 @@ h6 {
.ant-select-dropdown {
.ant-select-dropdown {
top: 36px !important;
top: 36px !important;
}
}
}
// 强制块级标签居中
.global-block-center {
margin-left: auto !important;
margin-right: auto !important;
}
}
\ No newline at end of file
src/hooks/useMethods.ts
0 → 100644
View file @
ead61aee
import
{
useState
,
useMemo
}
from
'react'
;
interface
stringMethods
{
[
key
:
string
]:
(...
args
)
=>
any
}
/**
* @description 传入一个值和方法map, 返回对应控制该状态的fn
* @param initialValue 初始状态
* @param methods 控制状态的方法集合对象
* @author xjm
*/
export
const
useMethods
=
<
T
>
(
initialValue
:
T
,
methods
:
stringMethods
)
=>
{
const
[
value
,
setValue
]
=
useState
<
T
>
(
initialValue
);
const
boundMethods
=
useMemo
(
()
=>
Object
.
entries
(
methods
).
reduce
(
(
methods
,
[
name
,
fn
])
=>
{
const
method
=
(...
args
)
=>
{
setValue
(
value
=>
fn
(
value
,
...
args
));
};
methods
[
name
]
=
method
;
return
methods
;
},
{}
),
[
methods
]
);
return
[
value
,
boundMethods
];
};
\ No newline at end of file
src/locales/zh-CN/menu.ts
View file @
ead61aee
...
@@ -97,6 +97,8 @@ export default {
...
@@ -97,6 +97,8 @@ export default {
'menu.tranactionAbility.enquirySubmit'
:
'需求发布'
,
'menu.tranactionAbility.enquirySubmit'
:
'需求发布'
,
'menu.tranactionAbility.enquirySubmit.SearchList'
:
'待新增需求单'
,
'menu.tranactionAbility.enquirySubmit.SearchList'
:
'待新增需求单'
,
'menu.tranactionAbility.enquirySubmit.addEnquiry'
:
'新增需求单'
,
'menu.tranactionAbility.enquirySubmit.addEnquiry'
:
'新增需求单'
,
'menu.tranactionAbility.purchaseOrder'
:
'采购订单'
,
'menu.tranactionAbility.purchaseOrder.purchaseOrderSearch'
:
'订单查询'
,
//物流能力
//物流能力
'menu.logisticsAbility'
:
'物流'
,
'menu.logisticsAbility'
:
'物流'
,
...
...
src/pages/transaction/purchaseOrder/index.tsx
0 → 100644
View file @
ead61aee
import
React
from
'react'
import
DetailPage
from
'@/components/DetailPage'
import
{
Card
}
from
'antd'
import
{
StandardTable
}
from
'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
export
interface
PurchaseOrderProps
{}
const
orderColumns
=
[
{
dataIndex
:
'orderId'
,
title
:
'订单号'
}
]
const
fetchTableData
=
async
(
params
)
=>
{
return
[]
}
const
PurchaseOrder
:
React
.
FC
<
PurchaseOrderProps
>
=
(
props
)
=>
{
return
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
columns=
{
orderColumns
}
/>
</
Card
>
</
PageHeaderWrapper
>
}
PurchaseOrder
.
defaultProps
=
{}
export
default
PurchaseOrder
\ No newline at end of file
src/pages/user/index.less
View file @
ead61aee
...
@@ -131,13 +131,11 @@
...
@@ -131,13 +131,11 @@
margin-bottom: 0;
margin-bottom: 0;
}
}
}
}
.registerForm {
.registerForm {
max-width: 335px;
max-width: 335px;
margin: 0px auto;
margin: 0px auto;
padding-top: 40px;
padding-top: 40px;
}
}
.registerBox {
.registerBox {
width: 100%;
width: 100%;
min-height: 700px;
min-height: 700px;
...
...
src/pages/user/register.tsx
View file @
ead61aee
...
@@ -175,6 +175,9 @@ const UserRegistry = () => {
...
@@ -175,6 +175,9 @@ const UserRegistry = () => {
PublicApi
.
postMemberRegister
(
params
).
then
(()
=>
{
PublicApi
.
postMemberRegister
(
params
).
then
(()
=>
{
actions
.
dispatch
(
'onFormStepNext'
,
{})
actions
.
dispatch
(
'onFormStepNext'
,
{})
setCurrent
(
current
+
1
)
setCurrent
(
current
+
1
)
}).
finally
(()
=>
{
// 调用接口后 无论成功失败需清空缓存的数据
formCache
=
{}
})
})
})
})
}
}
...
@@ -205,7 +208,7 @@ const UserRegistry = () => {
...
@@ -205,7 +208,7 @@ const UserRegistry = () => {
businessTypeTitle
:
<
span
className=
{
styles
.
commonPanelTitle
}
>
请选择您要开展的业务
</
span
>,
businessTypeTitle
:
<
span
className=
{
styles
.
commonPanelTitle
}
>
请选择您要开展的业务
</
span
>,
}
}
}
}
/>
/>
<
div
className=
{
styles
.
registerForm
}
>
<
div
className=
{
cx
(
styles
.
registerForm
,
'global-block-center'
)
}
>
{
{
current
===
0
&&
current
===
0
&&
<
Button
type=
'primary'
className=
{
styles
.
continueButton
}
onClick=
{
handleActionBtn
}
>
同意协议并注册
</
Button
>
<
Button
type=
'primary'
className=
{
styles
.
continueButton
}
onClick=
{
handleActionBtn
}
>
同意协议并注册
</
Button
>
...
...
src/pages/user/schema/index.ts
View file @
ead61aee
...
@@ -9,7 +9,7 @@ export const registerStep0Schema: ISchema = {
...
@@ -9,7 +9,7 @@ export const registerStep0Schema: ISchema = {
type
:
'object'
,
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
"x-component-props"
:
{
className
:
'registerForm'
,
className
:
'registerForm
global-block-center
'
,
full
:
true
full
:
true
},
},
properties
:
{
properties
:
{
...
@@ -106,7 +106,7 @@ export const registerStep1Schema: ISchema = {
...
@@ -106,7 +106,7 @@ export const registerStep1Schema: ISchema = {
type
:
'object'
,
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
"x-component-props"
:
{
className
:
'formBoxStep2'
className
:
'formBoxStep2
global-block-center
'
},
},
properties
:
{
properties
:
{
BLOCK_LAYOUT1
:
{
BLOCK_LAYOUT1
:
{
...
@@ -171,7 +171,7 @@ export const forgetPwdSchema: ISchema = {
...
@@ -171,7 +171,7 @@ export const forgetPwdSchema: ISchema = {
type
:
'object'
,
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
"x-component-props"
:
{
className
:
'registerForm'
,
className
:
'registerForm
global-block-center
'
,
full
:
true
full
:
true
},
},
properties
:
{
properties
:
{
...
...
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