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
fdf6051b
Commit
fdf6051b
authored
Aug 31, 2020
by
前端-钟卫鹏
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
aeb81bbb
22403869
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
240 additions
and
2 deletions
+240
-2
tranactionRoute.ts
config/routes/tranactionRoute.ts
+6
-0
index.ts
src/constants/index.ts
+11
-0
menu.ts
src/locales/zh-CN/menu.ts
+1
-0
index.less
...nsaction/purchaseOrder/components/StatusColors/index.less
+0
-0
index.tsx
...ansaction/purchaseOrder/components/StatusColors/index.tsx
+95
-0
index.tsx
src/pages/transaction/purchaseOrder/readyAddOrder/index.tsx
+39
-0
useReadyAddOrder.tsx
...on/purchaseOrder/readyAddOrder/model/useReadyAddOrder.tsx
+75
-0
index.ts
...s/transaction/purchaseOrder/readyAddOrder/schema/index.ts
+0
-0
register.tsx
src/pages/user/register.tsx
+9
-2
index.tsx
src/utils/index.tsx
+4
-0
No files found.
config/routes/tranactionRoute.ts
View file @
fdf6051b
...
...
@@ -97,6 +97,12 @@ const TranactionRoute = {
key
:
'purchaseOrderSearch'
,
component
:
'@/pages/transaction/purchaseOrder'
},
{
path
:
'/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder'
,
name
:
'readyAddOrder'
,
key
:
'readyAddOrder'
,
component
:
'@/pages/transaction/purchaseOrder/readyAddOrder'
},
]
}
]
...
...
src/constants/index.ts
View file @
fdf6051b
...
...
@@ -118,3 +118,14 @@ export const UPLOAD_TYPE = isDev ? 2 : 1
export
const
VIP_RULE_TRANSACTION
=
1
;
// 交易
export
const
VIP_RULE_LOGIN
=
2
;
// 登录
export
const
VIP_RULE_COMMENT
=
3
;
// 评论
export
const
ORDER_TYPE
=
[
''
,
'询价采购'
,
'需求采购'
,
'现货采购'
,
'集采'
,
'积分兑换'
,
'渠道直采'
,
'渠道现货'
,
'渠道积分兑换'
,
]
src/locales/zh-CN/menu.ts
View file @
fdf6051b
...
...
@@ -106,6 +106,7 @@ export default {
'menu.tranactionAbility.enquirySubmit.addEnquiry'
:
'新增需求单'
,
'menu.tranactionAbility.purchaseOrder'
:
'采购订单'
,
'menu.tranactionAbility.purchaseOrder.purchaseOrderSearch'
:
'订单查询'
,
'menu.tranactionAbility.purchaseOrder.readyAddOrder'
:
'待新增订单'
,
//物流能力
'menu.logisticsAbility'
:
'物流'
,
...
...
src/pages/transaction/purchaseOrder/components/StatusColors/index.less
0 → 100644
View file @
fdf6051b
src/pages/transaction/purchaseOrder/components/StatusColors/index.tsx
0 → 100644
View file @
fdf6051b
import
React
from
'react'
import
{
Tag
}
from
'antd'
export
interface
IStatusColor
{
[
key
:
string
]:
{
value
:
string
|
number
,
color
:
string
}
}
// 用于标签状态控制
export
interface
StatusColorsProps
{
status
:
number
}
export
enum
ORDER_EXAMINE_ENUM
{
/**
* 新增订单
*/
ADD_ORDER
=
1
,
/**
* 一级审核
*/
ONE_LEVEL_VALIDATE
,
/**
* 二级审核
*/
TWO_LEVEL_VALIDATE
,
/**
* 提交订单中
*/
SUBMIT_ORDER_PROCESS
,
/**
* 提交订单成功
*/
SUBMIT_ORDER_SUCCESS
,
/**
* 一级审核失败
*/
ONE_LEVEL_VALIDATE_ERROR
,
/**
* 二级审核失败
*/
TWO_LEVEL_VALIDATE_ERROR
}
export
const
ORDER_EXAMINE_LIST
=
[
''
,
'新增订单'
,
'一级审核中'
,
'二级审核中'
,
'提交订单'
,
'提交成功'
,
'一级审核不通过'
,
'二级审核不通过'
]
// 状态颜色映射
export
const
StatusColorsMaps
=
{
ready
:
'#C0C4CC'
,
process
:
'#FFC400'
,
submit
:
'#6C9CEB'
,
success
:
'#41CC9E'
,
error
:
'#EF6260'
}
const
matchStatusColor
=
(
status
:
number
):
string
=>
{
const
maps
=
{
[
ORDER_EXAMINE_ENUM
.
ADD_ORDER
]:
StatusColorsMaps
.
ready
,
[
ORDER_EXAMINE_ENUM
.
ONE_LEVEL_VALIDATE
]:
StatusColorsMaps
.
process
,
[
ORDER_EXAMINE_ENUM
.
TWO_LEVEL_VALIDATE
]:
StatusColorsMaps
.
process
,
[
ORDER_EXAMINE_ENUM
.
SUBMIT_ORDER_PROCESS
]:
StatusColorsMaps
.
submit
,
[
ORDER_EXAMINE_ENUM
.
SUBMIT_ORDER_SUCCESS
]:
StatusColorsMaps
.
success
}
// 默认返回错误的状态颜色
return
maps
[
status
]
||
StatusColorsMaps
.
error
}
// 订单内部状态显示
const
StatusColors
:
React
.
FC
<
StatusColorsProps
>
=
(
props
)
=>
{
const
{
status
}
=
props
const
statusShowColor
=
matchStatusColor
(
status
)
return
(<
Tag
color=
{
statusShowColor
}
>
{
ORDER_EXAMINE_LIST
[
status
]
}
</
Tag
>)
}
StatusColors
.
defaultProps
=
{}
export
default
StatusColors
\ No newline at end of file
src/pages/transaction/purchaseOrder/readyAddOrder/index.tsx
0 → 100644
View file @
fdf6051b
import
React
from
'react'
import
{
Card
}
from
'antd'
import
{
StandardTable
}
from
'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PublicApi
}
from
'@/services/api'
import
{
useReadyAddOrder
}
from
'./model/useReadyAddOrder'
// 待新增订单
export
interface
ReadyAddOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrderProcurementStayAddList
(
params
)
return
data
}
// TODO
const
ReadyAddOrder
:
React
.
FC
<
ReadyAddOrderProps
>
=
(
props
)
=>
{
const
{
columns
}
=
useReadyAddOrder
()
return
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
columns=
{
columns
}
formilyProps=
{
{
ctx
:
{
}
}
}
/>
</
Card
>
</
PageHeaderWrapper
>
}
ReadyAddOrder
.
defaultProps
=
{}
export
default
ReadyAddOrder
\ No newline at end of file
src/pages/transaction/purchaseOrder/readyAddOrder/model/useReadyAddOrder.tsx
0 → 100644
View file @
fdf6051b
import
React
from
'react'
import
{
Button
}
from
'antd'
import
{
formatTimeString
}
from
'@/utils'
import
{
ORDER_TYPE
}
from
'@/constants'
import
StatusColors
from
'../../components/StatusColors'
// 业务hooks, 待新增订单
export
const
useReadyAddOrder
=
()
=>
{
const
readyAddOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
},
{
title
:
'订单摘要'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
key
:
'orderThe'
,
},
{
title
:
'供应会员'
,
align
:
'center'
,
dataIndex
:
'supplyMembersName'
,
key
:
'supplyMembersName'
,
},
{
title
:
'下单时间'
,
align
:
'center'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
render
:
(
text
)
=>
formatTimeString
(
text
)
},
{
title
:
'订单总额'
,
align
:
'center'
,
dataIndex
:
'sumPrice'
,
key
:
'sumPrice'
,
},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
key
:
'type'
,
render
:
(
text
)
=>
ORDER_TYPE
[
text
]
},
{
title
:
'外部状态'
,
align
:
'center'
,
dataIndex
:
'externalState'
,
key
:
'externalState'
,
},
{
title
:
'内部状态'
,
align
:
'center'
,
dataIndex
:
'interiorState'
,
key
:
'interiorState'
,
render
:
(
text
)
=>
<
StatusColors
status=
{
text
}
/>
},
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
<
Button
type=
'link'
>
提交审核
</
Button
>
</>
}
]
return
{
columns
:
readyAddOrderColumns
}
}
src/pages/transaction/purchaseOrder/readyAddOrder/schema/index.ts
0 → 100644
View file @
fdf6051b
src/pages/user/register.tsx
View file @
fdf6051b
...
...
@@ -65,6 +65,7 @@ const actions = createFormActions()
const
UserRegistry
=
()
=>
{
const
[
current
,
setCurrent
]
=
useState
(
0
)
const
[
subStep
,
setSubStep
]
=
useState
(
false
)
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
)
const
stepList
=
[
{
title
:
'填写信息'
,
key
:
'message'
,
name
:
'message'
},
{
title
:
'完善资料'
,
key
:
'over'
,
name
:
'over'
},
...
...
@@ -151,6 +152,7 @@ const UserRegistry = () => {
const
{
values
}
=
data
formCache
=
Object
.
assign
({},
formCache
,
filterUndef
(
values
))
const
{
businessTypeId
,
typeId
}
=
values
setSubmitLoading
(
true
)
PublicApi
.
getMemberMenuRegisterDetail
({
businessTypeId
,
memberTypeId
:
typeId
...
...
@@ -163,6 +165,8 @@ const UserRegistry = () => {
}
}).
catch
(()
=>
{
}).
finally
(()
=>
{
setSubmitLoading
(
false
)
})
})
}
...
...
@@ -175,6 +179,7 @@ const UserRegistry = () => {
// 写死传入的区号
formCache
.
countryCode
=
'+86'
const
params
=
omit
(
formCache
,
[
'isRead'
,
'confirmPassword'
])
setSubmitLoading
(
true
)
PublicApi
.
postMemberRegister
(
params
).
then
(({
code
})
=>
{
if
(
code
===
1000
)
{
actions
.
dispatch
(
'onFormStepNext'
,
{})
...
...
@@ -184,6 +189,8 @@ const UserRegistry = () => {
}).
catch
(()
=>
{
// 调用接口后 失败需清空缓存的数据
formCache
=
{}
}).
finally
(()
=>
{
setSubmitLoading
(
false
)
})
})
}
...
...
@@ -221,11 +228,11 @@ const UserRegistry = () => {
}
{
current
===
1
&&
!
subStep
&&
<
Button
type=
'primary'
className=
{
'continueButton'
}
onClick=
{
nextStepAction
}
>
下一步:继续完善
</
Button
>
<
Button
type=
'primary'
className=
{
'continueButton'
}
onClick=
{
nextStepAction
}
loading=
{
submitLoading
}
>
下一步:继续完善
</
Button
>
}
{
current
===
1
&&
subStep
&&
<
Button
type=
'primary'
className=
{
'continueButton'
}
onClick=
{
submitForm
}
>
提交注册资料
</
Button
>
<
Button
type=
'primary'
className=
{
'continueButton'
}
onClick=
{
submitForm
}
loading=
{
submitLoading
}
>
提交注册资料
</
Button
>
}
</
div
>
{
...
...
src/utils/index.tsx
View file @
fdf6051b
...
...
@@ -13,6 +13,10 @@ export function isObject(obj: any) {
return
Object
.
prototype
.
toString
.
call
(
obj
)
===
'[object Object]'
}
export
function
formatTimeString
(
date
,
format
:
string
=
'YYYY-MM-DD HH:MM:SS'
)
{
return
date
?
moment
(
date
).
format
(
format
)
:
''
}
export
function
timeRange
(
val
:
number
)
{
let
st
,
et
;
switch
(
val
)
{
...
...
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