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
22403869
Commit
22403869
authored
Aug 31, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购订单
parent
4f8e5742
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
226 additions
and
0 deletions
+226
-0
tranactionRoute.ts
config/routes/tranactionRoute.ts
+6
-0
index.ts
src/constants/index.ts
+11
-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
No files found.
config/routes/tranactionRoute.ts
View file @
22403869
...
...
@@ -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 @
22403869
...
...
@@ -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/pages/transaction/purchaseOrder/components/StatusColors/index.less
0 → 100644
View file @
22403869
src/pages/transaction/purchaseOrder/components/StatusColors/index.tsx
0 → 100644
View file @
22403869
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 @
22403869
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 @
22403869
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 @
22403869
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