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
shenshaokai
jinfa-platform
Commits
22d91c26
Commit
22d91c26
authored
Mar 11, 2022
by
Gavin Peng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 送货计划协同
parent
afa6c34a
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1019 additions
and
61 deletions
+1019
-61
deliveryPlanCollaboration.ts
config/routes/orderRoute/deliveryPlanCollaboration.ts
+41
-0
deliveryPlanManagement.ts
config/routes/orderRoute/deliveryPlanManagement.ts
+2
-2
index.ts
config/routes/orderRoute/index.ts
+3
-1
details.tsx
...r/deliveryPlanCollaboration/deliveryPlanQuery/details.tsx
+26
-0
index.tsx
...der/deliveryPlanCollaboration/deliveryPlanQuery/index.tsx
+144
-0
index.tsx
...iveryPlanCollaboration/deliveryPlanQuery/schema/index.tsx
+80
-0
details.tsx
...eryPlanCollaboration/deliveryPlanUndetermined/details.tsx
+26
-0
index.tsx
...iveryPlanCollaboration/deliveryPlanUndetermined/index.tsx
+137
-0
index.tsx
...anCollaboration/deliveryPlanUndetermined/schema/index.tsx
+80
-0
details.tsx
...r/deliveryPlanManagement/deliveryPlanAwaitB2B/details.tsx
+21
-13
index.tsx
...der/deliveryPlanManagement/deliveryPlanAwaitB2B/index.tsx
+138
-9
index.tsx
...iveryPlanManagement/deliveryPlanAwaitB2B/schema/index.tsx
+80
-0
details.tsx
...r/deliveryPlanManagement/deliveryPlanAwaitSRM/details.tsx
+21
-13
index.tsx
...der/deliveryPlanManagement/deliveryPlanAwaitSRM/index.tsx
+131
-1
index.tsx
...iveryPlanManagement/deliveryPlanAwaitSRM/schema/index.tsx
+80
-0
details.tsx
...rder/deliveryPlanManagement/deliveryPlanQuery/details.tsx
+5
-5
index.tsx
.../order/deliveryPlanManagement/deliveryPlanQuery/index.tsx
+4
-17
No files found.
config/routes/orderRoute/deliveryPlanCollaboration.ts
0 → 100644
View file @
22d91c26
/**
* 订单能力 -- 送货计划协同
* @author: Gavin
*/
const
DeliveryPlanCollaboration
=
[
{
path
:
'/memberCenter/order/deliveryPlanCollaboration'
,
name
:
'送货计划协同'
,
routes
:
[
{
/** 送货计划查询 */
path
:
'/memberCenter/order/deliveryPlanCollaboration/query'
,
name
:
'送货计划查询'
,
component
:
'@/pages/order/deliveryPlanCollaboration/deliveryPlanQuery'
},
{
/** 送货计划详情 */
path
:
'/memberCenter/order/deliveryPlanCollaboration/details'
,
name
:
'送货计划详情'
,
component
:
'@/pages/order/deliveryPlanCollaboration/deliveryPlanQuery/details'
,
hideInMenu
:
true
,
},
{
/** 待确认送货计划 */
path
:
'/memberCenter/order/deliveryPlanCollaboration/undetermined'
,
name
:
'待确认送货计划'
,
component
:
'@/pages/order/deliveryPlanCollaboration/deliveryPlanUndetermined'
},
{
/** 待确认送货计划详情 */
path
:
'/memberCenter/order/deliveryPlanCollaboration/undeterminedDetails'
,
name
:
'待确认送货计划详情'
,
component
:
'@/pages/order/deliveryPlanCollaboration/deliveryPlanUndetermined/details'
,
hideInMenu
:
true
,
},
],
}
]
export
default
DeliveryPlanCollaboration
\ No newline at end of file
config/routes/orderRoute/deliveryPlanManagement.ts
View file @
22d91c26
...
...
@@ -54,4 +54,4 @@ const DeliveryPlanManagement = [
]
}
]
export
default
DeliveryPlanManagement
;
\ No newline at end of file
export
default
DeliveryPlanManagement
\ No newline at end of file
config/routes/orderRoute/index.ts
View file @
22d91c26
...
...
@@ -2,7 +2,8 @@
* 订单能力路由
* @author: Gavin
*/
import
DeliveryPlanManagement
from
'./deliveryPlanManagement'
import
DeliveryPlanCollaboration
from
'./deliveryPlanCollaboration'
import
DeliveryPlanManagement
from
'./deliveryPlanManagement'
const
OrderRoute
=
{
path
:
"/memberCenter/order"
,
...
...
@@ -10,6 +11,7 @@ const OrderRoute = {
icon
:
"order"
,
routes
:
[
...
DeliveryPlanManagement
,
...
DeliveryPlanCollaboration
,
]
}
...
...
src/pages/order/deliveryPlanCollaboration/deliveryPlanQuery/details.tsx
0 → 100644
View file @
22d91c26
/**
* 订单能力 - 送货计划协同 - 送货计划详情
* @author: Gavin
* @description:
*/
import
React
,
{
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
history
}
from
'umi'
import
ReutrnEle
from
'@/components/ReturnEle'
const
DeliveryPlanCollaborationDetails
:
React
.
FC
=
()
=>
{
const
[
details
,
setDetails
]
=
useState
<
any
>
({})
return
(
<
PageHeaderWrapper
title=
{
details
?.
name
}
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
/>
}
>
<
div
>
送货计划协同 - 送货计划详情
</
div
>
</
PageHeaderWrapper
>
)
}
export
default
DeliveryPlanCollaborationDetails
\ No newline at end of file
src/pages/order/deliveryPlanCollaboration/deliveryPlanQuery/index.tsx
0 → 100644
View file @
22d91c26
/**
* 订单能力 - 送货计划协同 - 送货计划查询
* @author: Gavin
* @description:
*/
import
React
,
{
useRef
,
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Button
,
Card
,
Space
,
Tag
}
from
'antd'
import
StandardTable
from
'@/components/StandardTable'
import
{
ColumnType
}
from
'antd/lib/table'
import
TableOperation
from
'@/components/TableOperation'
import
EyePreview
from
'@/components/EyePreview'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
deliveryPlanCollaborationQuerySchema
}
from
'./schema'
const
tagStatusColor
=
{
// 待提交
2
:
{
color
:
'#f4f5f7'
,
fontColor
:
'#5c626a'
},
// 待确认
3
:
{
color
:
'#ecf2fe'
,
fontColor
:
'#4787f0'
},
// 待修改
4
:
{
color
:
'#eae6ff'
,
fontColor
:
'#9963d8'
},
// 已确认
5
:
{
color
:
'#ebf9f6'
,
fontColor
:
'#00a98f'
}
}
const
DeliveryPlanCollaborationQuery
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
formActions
=
createFormActions
()
const
controllerBtns
=
(
<
Space
>
{
/* 杰哥说没有新增 */
}
</
Space
>
)
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'查看'
:
'DevTest'
,
'生成送货通知单'
:
'DevTest'
,
'生成送货单'
:
'DevTest'
,
}
const
buttonGroup
=
{
'查看'
:
true
,
'生成送货通知单'
:
true
,
'生成送货单'
:
true
,
}
const
operationHandler
=
{
'查看'
:
()
=>
{
console
.
log
(
'查看 :>> '
,)
},
'生成送货通知单'
:
()
=>
{
console
.
log
(
'生成送货通知单 :>> '
,)
},
'生成送货单'
:
()
=>
{
console
.
log
(
'生成送货通知单 :>> '
,)
},
}
return
(
<
TableOperation
buttonTextFieldMap=
{
buttonGroup
}
operationHandler=
{
operationHandler
}
buttonPermissionsMap=
{
btnAuthOfOperationTextMap
}
/>
)
}
const
columns
:
ColumnType
<
unknown
>
[]
=
[
{
title
:
'计划编号'
,
dataIndex
:
'id'
,
key
:
'id'
,
width
:
160
,
render
:
(
text
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/deliveryPlanCollaboration/details'
>
{
text
}
</
EyePreview
>
},
{
title
:
'计划摘要'
,
dataIndex
:
'id2'
,
key
:
'id2'
},
{
title
:
'计划开始日期'
,
dataIndex
:
'id3'
,
key
:
'id3'
},
{
title
:
'计划结束日期'
,
dataIndex
:
'id4'
,
key
:
'id4'
},
{
title
:
'供应会员'
,
dataIndex
:
'id5'
,
key
:
'id5'
},
{
title
:
'外部状态'
,
dataIndex
:
'id6'
,
key
:
'id6'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
<
Tag
color=
{
tagStatusColor
[
record
.
id
]?.
color
}
>
<
span
style=
{
{
color
:
tagStatusColor
[
record
.
id
]?.
fontColor
}
}
>
{
text
}
</
span
>
</
Tag
>
)
},
{
title
:
'操作'
,
dataIndex
:
''
,
key
:
'x'
,
align
:
'center'
,
render
:
(
record
)
=>
renderOptionButton
(
record
)
},
]
const
fetchData
=
(
params
:
unknown
)
=>
{
console
.
log
(
'params :>> '
,
params
);
return
new
Promise
((
resolve
)
=>
{
const
data
=
{
totalCount
:
1
,
data
:
[
{
id
:
1
,
id2
:
2
,
id3
:
3
,
id4
:
4
,
id5
:
5
,
id6
:
6
},
{
id
:
2
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
3
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
4
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
5
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
}
]
}
resolve
(
data
)
})
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
// keepAlive={false}
currentRef=
{
ref
}
columns=
{
columns
}
tableProps=
{
{
rowKey
:
'id'
,
}
}
fetchTableData=
{
(
params
:
unknown
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
expressionScope=
{
{
controllerBtns
,
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'planCode'
,
FORM_FILTER_PATH
,
)
}
}
schema=
{
deliveryPlanCollaborationQuerySchema
}
/>
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
DeliveryPlanCollaborationQuery
\ No newline at end of file
src/pages/order/deliveryPlanCollaboration/deliveryPlanQuery/schema/index.tsx
0 → 100644
View file @
22d91c26
/**
* 订单能力 -- 送货计划查询 Schema
* @author: Gavin
*/
import
{
ISchema
}
from
'@formily/antd'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
export
const
deliveryPlanCollaborationQuerySchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{controllerBtns}}'
,
},
},
planCode
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'请输入计划编号查询'
},
},
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
},
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
'[startTime, endTime]'
:
{
type
:
'daterange'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
[
'计划开始日期'
,
'计划结束日期'
],
},
},
supplyMember
:
{
type
:
'string'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'供应会员'
}
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
}
}
}
}
}
}
\ No newline at end of file
src/pages/order/deliveryPlanCollaboration/deliveryPlanUndetermined/details.tsx
0 → 100644
View file @
22d91c26
/**
* 订单能力 - 送货计划协同 - 待确认送货计划详情
* @author: Gavin
* @description:
*/
import
React
,
{
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
history
}
from
'umi'
import
ReutrnEle
from
'@/components/ReturnEle'
const
DeliveryPlanUndeterminedDetails
:
React
.
FC
=
()
=>
{
const
[
details
,
setDetails
]
=
useState
<
any
>
({})
return
(
<
PageHeaderWrapper
title=
{
details
?.
name
}
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
/>
}
>
<
div
>
送货计划协同 - 待确认送货计划详情
</
div
>
</
PageHeaderWrapper
>
)
}
export
default
DeliveryPlanUndeterminedDetails
\ No newline at end of file
src/pages/order/deliveryPlanCollaboration/deliveryPlanUndetermined/index.tsx
0 → 100644
View file @
22d91c26
/**
* 订单能力 - 送货计划协同 - 待确认送货计划
* @author: Gavin
* @description:
*/
import
React
,
{
useRef
,
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Button
,
Card
,
Space
,
Tag
}
from
'antd'
import
StandardTable
from
'@/components/StandardTable'
import
{
ColumnType
}
from
'antd/lib/table'
import
TableOperation
from
'@/components/TableOperation'
import
EyePreview
from
'@/components/EyePreview'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
deliveryPlanUndeterminedSchema
}
from
'./schema'
const
tagStatusColor
=
{
// 待提交
2
:
{
color
:
'#f4f5f7'
,
fontColor
:
'#5c626a'
},
// 待确认
3
:
{
color
:
'#ecf2fe'
,
fontColor
:
'#4787f0'
},
// 待修改
4
:
{
color
:
'#eae6ff'
,
fontColor
:
'#9963d8'
},
// 已确认
5
:
{
color
:
'#ebf9f6'
,
fontColor
:
'#00a98f'
}
}
const
DeliveryPlanUndetermined
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
formActions
=
createFormActions
()
const
controllerBtns
=
(<
Space
></
Space
>)
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'确认'
:
'DevTest'
,
'查看'
:
'DevTest'
,
}
const
buttonGroup
=
{
'确认'
:
true
,
'查看'
:
true
,
}
const
operationHandler
=
{
'确认'
:
()
=>
{
console
.
log
(
'确认 :>> '
,)
},
'查看'
:
()
=>
{
console
.
log
(
'查看 :>> '
,)
},
}
return
(
<
TableOperation
buttonTextFieldMap=
{
buttonGroup
}
operationHandler=
{
operationHandler
}
buttonPermissionsMap=
{
btnAuthOfOperationTextMap
}
/>
)
}
const
columns
:
ColumnType
<
unknown
>
[]
=
[
{
title
:
'计划编号'
,
dataIndex
:
'id'
,
key
:
'id'
,
width
:
160
,
render
:
(
text
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/deliveryPlanCollaboration/undeterminedDetails'
>
{
text
}
</
EyePreview
>
},
{
title
:
'计划摘要'
,
dataIndex
:
'id2'
,
key
:
'id2'
},
{
title
:
'计划开始日期'
,
dataIndex
:
'id3'
,
key
:
'id3'
},
{
title
:
'计划结束日期'
,
dataIndex
:
'id4'
,
key
:
'id4'
},
{
title
:
'供应会员'
,
dataIndex
:
'id5'
,
key
:
'id5'
},
{
title
:
'外部状态'
,
dataIndex
:
'id6'
,
key
:
'id6'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
<
Tag
color=
{
tagStatusColor
[
record
.
id
]?.
color
}
>
<
span
style=
{
{
color
:
tagStatusColor
[
record
.
id
]?.
fontColor
}
}
>
{
text
}
</
span
>
</
Tag
>
)
},
{
title
:
'操作'
,
dataIndex
:
''
,
key
:
'x'
,
align
:
'center'
,
render
:
(
record
)
=>
renderOptionButton
(
record
)
},
]
const
fetchData
=
(
params
:
unknown
)
=>
{
console
.
log
(
'params :>> '
,
params
);
return
new
Promise
((
resolve
)
=>
{
const
data
=
{
totalCount
:
1
,
data
:
[
{
id
:
1
,
id2
:
2
,
id3
:
3
,
id4
:
4
,
id5
:
5
,
id6
:
6
},
{
id
:
2
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
3
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
4
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
5
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
}
]
}
resolve
(
data
)
})
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
// keepAlive={false}
currentRef=
{
ref
}
columns=
{
columns
}
tableProps=
{
{
rowKey
:
'id'
,
}
}
fetchTableData=
{
(
params
:
unknown
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
expressionScope=
{
{
controllerBtns
,
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'planCode'
,
FORM_FILTER_PATH
,
)
}
}
schema=
{
deliveryPlanUndeterminedSchema
}
/>
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
DeliveryPlanUndetermined
\ No newline at end of file
src/pages/order/deliveryPlanCollaboration/deliveryPlanUndetermined/schema/index.tsx
0 → 100644
View file @
22d91c26
/**
* 订单能力 -- 送货计划查询 Schema
* @author: Gavin
*/
import
{
ISchema
}
from
'@formily/antd'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
export
const
deliveryPlanUndeterminedSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{controllerBtns}}'
,
},
},
planCode
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'请输入计划编号查询'
},
},
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
},
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
'[startTime, endTime]'
:
{
type
:
'daterange'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
[
'计划开始日期'
,
'计划结束日期'
],
},
},
supplyMember
:
{
type
:
'string'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'供应会员'
}
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
}
}
}
}
}
}
\ No newline at end of file
src/pages/order/deliveryPlanManagement/deliveryPlanAwaitB2B/details.tsx
View file @
22d91c26
...
...
@@ -3,15 +3,23 @@
* @author: Gavin
* @description: 与SRM内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import
React
,
{
useRef
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
const
DeliveryPlanAwaitB2BDetails
:
React
.
FC
=
()
=>
{
return
(
<
PageHeaderWrapper
>
<
div
>
待提交送货计划 B2B 详情
</
div
>
</
PageHeaderWrapper
>
)
}
export
default
DeliveryPlanAwaitB2BDetails
\ No newline at end of file
import
React
,
{
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
history
}
from
'umi'
import
ReutrnEle
from
'@/components/ReturnEle'
const
DeliveryPlanAwaitB2BDetails
:
React
.
FC
=
()
=>
{
const
[
details
,
setDetails
]
=
useState
<
any
>
({})
return
(
<
PageHeaderWrapper
title=
{
details
?.
name
}
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
/>
}
>
<
div
>
待提交送货计划 B2B 详情
</
div
>
</
PageHeaderWrapper
>
)
}
export
default
DeliveryPlanAwaitB2BDetails
\ No newline at end of file
src/pages/order/deliveryPlanManagement/deliveryPlanAwaitB2B/index.tsx
View file @
22d91c26
...
...
@@ -5,13 +5,142 @@
*/
import
React
,
{
useRef
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Button
,
Card
,
Space
,
Tag
}
from
'antd'
import
{
PlusOutlined
}
from
'@ant-design/icons'
import
StandardTable
from
'@/components/StandardTable'
import
{
ColumnType
}
from
'antd/lib/table'
import
TableOperation
from
'@/components/TableOperation'
import
EyePreview
from
'@/components/EyePreview'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
deliveryPlanAwaitB2BSchema
}
from
'./schema'
const
DeliveryPlanAwaitB2B
:
React
.
FC
=
()
=>
{
return
(
<
PageHeaderWrapper
>
<
div
>
待提交送货计划 B2B
</
div
>
</
PageHeaderWrapper
>
)
}
const
tagStatusColor
=
{
// 待提交
2
:
{
color
:
'#f4f5f7'
,
fontColor
:
'#5c626a'
},
// 待确认
3
:
{
color
:
'#ecf2fe'
,
fontColor
:
'#4787f0'
},
// 待修改
4
:
{
color
:
'#eae6ff'
,
fontColor
:
'#9963d8'
},
// 已确认
5
:
{
color
:
'#ebf9f6'
,
fontColor
:
'#00a98f'
}
}
const
DeliveryPlanAwaitB2B
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
formActions
=
createFormActions
()
export
default
DeliveryPlanAwaitB2B
\ No newline at end of file
const
controllerBtns
=
(
<
Space
>
<
Button
type=
'primary'
icon=
{
<
PlusOutlined
/>
}
>
新增
</
Button
>
</
Space
>
)
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'提交'
:
'DevTest'
,
'修改'
:
'DevTest'
,
'删除'
:
'DevTest'
,
'查看'
:
'DevTest'
,
}
const
buttonGroup
=
{
'提交'
:
true
,
'修改'
:
true
,
'删除'
:
true
,
'查看'
:
true
,
}
const
operationHandler
=
{
'提交'
:
()
=>
{
console
.
log
(
'提交 :>> '
,)
},
'修改'
:
()
=>
{
console
.
log
(
'修改 :>> '
,)
},
'删除'
:
()
=>
{
console
.
log
(
'删除 :>> '
,)
},
'查看'
:
()
=>
{
console
.
log
(
'查看 :>> '
,)
},
}
return
(
<
TableOperation
buttonTextFieldMap=
{
buttonGroup
}
operationHandler=
{
operationHandler
}
buttonPermissionsMap=
{
btnAuthOfOperationTextMap
}
/>
)
}
const
columns
:
ColumnType
<
unknown
>
[]
=
[
{
title
:
'计划编号'
,
dataIndex
:
'id'
,
key
:
'id'
,
width
:
160
,
render
:
(
text
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/deliveryPlanManagement/awaitB2BDetails'
>
{
text
}
</
EyePreview
>
},
{
title
:
'计划摘要'
,
dataIndex
:
'id2'
,
key
:
'id2'
},
{
title
:
'计划开始日期'
,
dataIndex
:
'id3'
,
key
:
'id3'
},
{
title
:
'计划结束日期'
,
dataIndex
:
'id4'
,
key
:
'id4'
},
{
title
:
'供应会员'
,
dataIndex
:
'id5'
,
key
:
'id5'
},
{
title
:
'外部状态'
,
dataIndex
:
'id6'
,
key
:
'id6'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
<
Tag
color=
{
tagStatusColor
[
record
.
id
]?.
color
}
>
<
span
style=
{
{
color
:
tagStatusColor
[
record
.
id
]?.
fontColor
}
}
>
{
text
}
</
span
>
</
Tag
>
)
},
{
title
:
'操作'
,
dataIndex
:
''
,
key
:
'x'
,
align
:
'center'
,
render
:
(
record
)
=>
renderOptionButton
(
record
)
},
]
const
fetchData
=
(
params
:
unknown
)
=>
{
console
.
log
(
'params :>> '
,
params
);
return
new
Promise
((
resolve
)
=>
{
const
data
=
{
totalCount
:
1
,
data
:
[
{
id
:
1
,
id2
:
2
,
id3
:
3
,
id4
:
4
,
id5
:
5
,
id6
:
6
},
{
id
:
2
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
3
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
4
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
5
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
}
]
}
resolve
(
data
)
})
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
// keepAlive={false}
currentRef=
{
ref
}
columns=
{
columns
}
tableProps=
{
{
rowKey
:
'id'
,
}
}
fetchTableData=
{
(
params
:
unknown
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
expressionScope=
{
{
controllerBtns
,
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'planCode'
,
FORM_FILTER_PATH
,
)
}
}
schema=
{
deliveryPlanAwaitB2BSchema
}
/>
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
DeliveryPlanAwaitB2B
\ No newline at end of file
src/pages/order/deliveryPlanManagement/deliveryPlanAwaitB2B/schema/index.tsx
0 → 100644
View file @
22d91c26
/**
* 订单能力 -- 送货计划查询 Schema
* @author: Gavin
*/
import
{
ISchema
}
from
'@formily/antd'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
export
const
deliveryPlanAwaitB2BSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{controllerBtns}}'
,
},
},
planCode
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'请输入计划编号查询'
},
},
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
},
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
'[startTime, endTime]'
:
{
type
:
'daterange'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
[
'计划开始日期'
,
'计划结束日期'
],
},
},
supplyMember
:
{
type
:
'string'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'供应会员'
}
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
}
}
}
}
}
}
\ No newline at end of file
src/pages/order/deliveryPlanManagement/deliveryPlanAwaitSRM/details.tsx
View file @
22d91c26
...
...
@@ -3,15 +3,23 @@
* @author: Gavin
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import
React
,
{
useRef
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
const
DeliveryPlanAwaitSRMDetails
:
React
.
FC
=
()
=>
{
return
(
<
PageHeaderWrapper
>
<
div
>
待提交送货计划 SRM 详情
</
div
>
</
PageHeaderWrapper
>
)
}
export
default
DeliveryPlanAwaitSRMDetails
\ No newline at end of file
import
React
,
{
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
history
}
from
'umi'
import
ReutrnEle
from
'@/components/ReturnEle'
const
DeliveryPlanAwaitSRMDetails
:
React
.
FC
=
()
=>
{
const
[
details
,
setDetails
]
=
useState
<
any
>
({})
return
(
<
PageHeaderWrapper
title=
{
details
?.
name
}
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
/>
}
>
<
div
>
待提交送货计划 SRM 详情
</
div
>
</
PageHeaderWrapper
>
)
}
export
default
DeliveryPlanAwaitSRMDetails
\ No newline at end of file
src/pages/order/deliveryPlanManagement/deliveryPlanAwaitSRM/index.tsx
View file @
22d91c26
...
...
@@ -5,11 +5,141 @@
*/
import
React
,
{
useRef
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Button
,
Card
,
Space
,
Tag
}
from
'antd'
import
{
PlusOutlined
}
from
'@ant-design/icons'
import
StandardTable
from
'@/components/StandardTable'
import
{
ColumnType
}
from
'antd/lib/table'
import
TableOperation
from
'@/components/TableOperation'
import
EyePreview
from
'@/components/EyePreview'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
deliveryPlanAwaitSRMSchema
}
from
'./schema'
const
tagStatusColor
=
{
// 待提交
2
:
{
color
:
'#f4f5f7'
,
fontColor
:
'#5c626a'
},
// 待确认
3
:
{
color
:
'#ecf2fe'
,
fontColor
:
'#4787f0'
},
// 待修改
4
:
{
color
:
'#eae6ff'
,
fontColor
:
'#9963d8'
},
// 已确认
5
:
{
color
:
'#ebf9f6'
,
fontColor
:
'#00a98f'
}
}
const
DeliveryPlanAwaitSRM
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
formActions
=
createFormActions
()
const
controllerBtns
=
(
<
Space
>
<
Button
type=
'primary'
icon=
{
<
PlusOutlined
/>
}
>
新增
</
Button
>
</
Space
>
)
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'提交'
:
'DevTest'
,
'修改'
:
'DevTest'
,
'删除'
:
'DevTest'
,
'查看'
:
'DevTest'
,
}
const
buttonGroup
=
{
'提交'
:
true
,
'修改'
:
true
,
'删除'
:
true
,
'查看'
:
true
,
}
const
operationHandler
=
{
'提交'
:
()
=>
{
console
.
log
(
'提交 :>> '
,)
},
'修改'
:
()
=>
{
console
.
log
(
'修改 :>> '
,)
},
'删除'
:
()
=>
{
console
.
log
(
'删除 :>> '
,)
},
'查看'
:
()
=>
{
console
.
log
(
'查看 :>> '
,)
},
}
return
(
<
TableOperation
buttonTextFieldMap=
{
buttonGroup
}
operationHandler=
{
operationHandler
}
buttonPermissionsMap=
{
btnAuthOfOperationTextMap
}
/>
)
}
const
columns
:
ColumnType
<
unknown
>
[]
=
[
{
title
:
'计划编号'
,
dataIndex
:
'id'
,
key
:
'id'
,
width
:
160
,
render
:
(
text
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/deliveryPlanManagement/awaitSRMDetails'
>
{
text
}
</
EyePreview
>
},
{
title
:
'计划摘要'
,
dataIndex
:
'id2'
,
key
:
'id2'
},
{
title
:
'计划开始日期'
,
dataIndex
:
'id3'
,
key
:
'id3'
},
{
title
:
'计划结束日期'
,
dataIndex
:
'id4'
,
key
:
'id4'
},
{
title
:
'供应会员'
,
dataIndex
:
'id5'
,
key
:
'id5'
},
{
title
:
'外部状态'
,
dataIndex
:
'id6'
,
key
:
'id6'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
<
Tag
color=
{
tagStatusColor
[
record
.
id
]?.
color
}
>
<
span
style=
{
{
color
:
tagStatusColor
[
record
.
id
]?.
fontColor
}
}
>
{
text
}
</
span
>
</
Tag
>
)
},
{
title
:
'操作'
,
dataIndex
:
''
,
key
:
'x'
,
align
:
'center'
,
render
:
(
record
)
=>
renderOptionButton
(
record
)
},
]
const
fetchData
=
(
params
:
unknown
)
=>
{
console
.
log
(
'params :>> '
,
params
);
return
new
Promise
((
resolve
)
=>
{
const
data
=
{
totalCount
:
1
,
data
:
[
{
id
:
1
,
id2
:
2
,
id3
:
3
,
id4
:
4
,
id5
:
5
,
id6
:
6
},
{
id
:
2
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
3
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
4
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
5
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
}
]
}
resolve
(
data
)
})
}
return
(
<
PageHeaderWrapper
>
<
div
>
待提交送货计划 SRM
</
div
>
<
Card
>
<
StandardTable
// keepAlive={false}
currentRef=
{
ref
}
columns=
{
columns
}
tableProps=
{
{
rowKey
:
'id'
,
}
}
fetchTableData=
{
(
params
:
unknown
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
expressionScope=
{
{
controllerBtns
,
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'planCode'
,
FORM_FILTER_PATH
,
)
}
}
schema=
{
deliveryPlanAwaitSRMSchema
}
/>
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
...
...
src/pages/order/deliveryPlanManagement/deliveryPlanAwaitSRM/schema/index.tsx
0 → 100644
View file @
22d91c26
/**
* 订单能力 -- 送货计划查询 Schema
* @author: Gavin
*/
import
{
ISchema
}
from
'@formily/antd'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
export
const
deliveryPlanAwaitSRMSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{controllerBtns}}'
,
},
},
planCode
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'请输入计划编号查询'
},
},
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
},
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
'[startTime, endTime]'
:
{
type
:
'daterange'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
[
'计划开始日期'
,
'计划结束日期'
],
},
},
supplyMember
:
{
type
:
'string'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'供应会员'
}
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
}
}
}
}
}
}
\ No newline at end of file
src/pages/order/deliveryPlanManagement/deliveryPlanQuery/details.tsx
View file @
22d91c26
...
...
@@ -9,15 +9,15 @@ import ReutrnEle from '@/components/ReturnEle'
import
{
Card
,
Descriptions
}
from
'antd'
const
DeliveryPlanManagementDetails
:
React
.
FC
=
()
=>
{
const
[
details
,
setDetails
]
=
useState
<
unknown
>
({})
const
[
details
,
setDetails
]
=
useState
<
any
>
({})
return
(
<
PageHeaderWrapper
title=
{
details
?.
name
}
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
/>
}
title=
{
details
?.
name
}
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
/>
}
>
</
PageHeaderWrapper
>)
}
...
...
src/pages/order/deliveryPlanManagement/deliveryPlanQuery/index.tsx
View file @
22d91c26
...
...
@@ -16,19 +16,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const'
import
{
deliveryPlanManagementQuerySchema
}
from
'./schema'
const
tagStatusColor
=
{
// // 待提交
// 2: 'default',
// // 待确认
// 3: 'blue',
// // 待修改
// 4: 'purple',
// // 已确认
// 5: 'success'
// 待提交
1
:
{
color
:
'#f4f5f7'
,
fontColor
:
'#5c626a'
},
2
:
{
color
:
'#f4f5f7'
,
fontColor
:
'#5c626a'
...
...
@@ -51,7 +39,7 @@ const tagStatusColor = {
}
const
DeliveryPlanManagementQuery
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
unknown
>
({})
const
ref
=
useRef
<
any
>
({})
const
formActions
=
createFormActions
()
const
controllerBtns
=
(
...
...
@@ -59,7 +47,7 @@ const DeliveryPlanManagementQuery: React.FC = () => {
{
/* 杰哥说没有新增按钮 */
}
</
Space
>
)
const
renderOptionButton
=
(
record
:
unknown
)
=>
{
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'查看'
:
'DevTest'
,
'变更'
:
'DevTest'
...
...
@@ -97,8 +85,8 @@ const DeliveryPlanManagementQuery: React.FC = () => {
dataIndex
:
'id6'
,
key
:
'id6'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
<
Tag
color=
{
tagStatusColor
[
record
.
id
].
color
}
>
<
span
style=
{
{
color
:
tagStatusColor
[
record
.
id
].
fontColor
}
}
>
{
text
}
</
span
>
<
Tag
color=
{
tagStatusColor
[
record
.
id
]
?
.
color
}
>
<
span
style=
{
{
color
:
tagStatusColor
[
record
.
id
]
?
.
fontColor
}
}
>
{
text
}
</
span
>
</
Tag
>
)
},
...
...
@@ -111,7 +99,6 @@ const DeliveryPlanManagementQuery: React.FC = () => {
},
]
const
fetchData
=
(
params
:
unknown
)
=>
{
console
.
log
(
'params :>> '
,
params
);
return
new
Promise
((
resolve
)
=>
{
...
...
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