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
a01929a6
Commit
a01929a6
authored
Apr 10, 2022
by
Gavin Peng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 对接送货计划协同
parent
65449c05
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
153 additions
and
11 deletions
+153
-11
index.tsx
src/pages/order/components/CustomizedModal2/index.tsx
+143
-0
index.tsx
src/pages/order/components/customizedModal/index.tsx
+1
-1
details.tsx
...r/deliveryPlanCollaboration/deliveryPlanAwait/details.tsx
+0
-0
index.tsx
...der/deliveryPlanCollaboration/deliveryPlanAwait/index.tsx
+1
-1
details.tsx
...r/deliveryPlanCollaboration/deliveryPlanQuery/details.tsx
+0
-0
index.tsx
...der/deliveryPlanCollaboration/deliveryPlanQuery/index.tsx
+1
-1
details.tsx
...rder/deliveryPlanManagement/deliveryPlanQuery/details.tsx
+1
-2
update.tsx
...order/deliveryPlanManagement/deliveryPlanQuery/update.tsx
+6
-6
No files found.
src/pages/order/components/CustomizedModal2/index.tsx
0 → 100644
View file @
a01929a6
/**
* 业务定制弹窗
* @author: Gavin
* @description: 【Ref 版本】选状态反馈选择结果, 示例应用场景: 详情页面点击提交, 弹窗选择审核状态, 是否需要填写原因。 ~~~!!!!单选模式,暂为不可异步, 待优化。
*/
import
{
Form
,
Input
,
Modal
,
Radio
}
from
'antd'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
ModalCancelText
,
ModalOkText
,
ReasonPlaceholder
,
ReasonRulesMessage
,
SelectRadioRulesMessage
}
from
'../translate'
;
export
interface
IRadioGroup
{
/**
* Radio Label
*/
label
:
string
,
/**
* Radio Value (Must be unique)
*/
value
:
string
|
number
,
/**
* Need to fill in the reason
*/
isReason
?:
boolean
}
export
interface
SubmitFeedback
{
/**
* Radio box checked value
*/
selectedRadio
:
string
|
number
,
/**
* Input content
*/
reason
?:
string
,
}
interface
CustomizedModalProps
{
/**
* (必填) 标题
*/
title
:
string
,
/**
* (必填) 是否显示
*/
visible
:
boolean
,
/**
* (必填) Radio.Group渲染数组
*/
radioGroup
:
IRadioGroup
[],
/**
* (必填) 内部校验通过返回
*/
onSubmit
:
(
values
:
SubmitFeedback
)
=>
void
/**
* (必填) 关闭操作反馈 visible 布尔值
*/
onCancel
:
(
visible
:
boolean
)
=>
void
/**
* (非必填) 默认选中 Radio
*/
defaultRadioValue
?:
string
|
number
,
/**
* (非必填) 确认按钮文字自定义
*/
okText
?:
string
,
/**
* (非必填) 取消按钮文字自定义
*/
cancelText
?:
string
,
}
const
CustomizedModal
:
React
.
FC
<
CustomizedModalProps
>
=
(
props
)
=>
{
const
[
form
]
=
Form
.
useForm
()
const
[
visibleReason
,
setVisibleReason
]
=
useState
<
boolean
>
(
false
)
const
onOk
=
()
=>
{
form
.
validateFields
().
then
(
values
=>
{
props
.
onSubmit
(
values
)
})
}
const
onCancel
=
()
=>
{
props
.
onCancel
(
false
)
}
const
onRadioGroupChange
=
(
val
:
any
)
=>
{
setVisibleReason
(
props
.
radioGroup
.
find
(
_f
=>
_f
.
value
==
val
)?.
isReason
)
}
useEffect
(()
=>
{
if
(
!
props
.
visible
)
{
form
.
resetFields
()
}
else
{
if
(
props
?.
defaultRadioValue
)
{
const
_visibleReason
=
props
.
radioGroup
.
find
(
_f
=>
_f
.
value
===
props
?.
defaultRadioValue
)?.
isReason
setVisibleReason
(
_visibleReason
)
}
}
},[
props
.
visible
])
return
(
<
Modal
title=
{
props
.
title
}
visible=
{
props
.
visible
}
okText=
{
props
?.
okText
||
ModalOkText
}
cancelText=
{
props
?.
okText
||
ModalCancelText
}
onOk=
{
onOk
}
onCancel=
{
onCancel
}
>
<
Form
form=
{
form
}
>
<
Form
.
Item
name=
'isPass'
initialValue=
{
props
.
defaultRadioValue
}
rules=
{
[{
required
:
true
,
message
:
SelectRadioRulesMessage
}]
}
>
<
Radio
.
Group
onChange=
{
(
e
)
=>
onRadioGroupChange
(
e
.
target
.
value
)
}
>
{
props
.
radioGroup
?.
map
((
item
:
IRadioGroup
,
index
:
number
)
=>
(
<
Radio
value=
{
item
.
value
}
key=
{
index
}
>
{
item
.
label
}
</
Radio
>
))
}
</
Radio
.
Group
>
</
Form
.
Item
>
{
visibleReason
?
<
Form
.
Item
name=
'reason'
rules=
{
[{
required
:
true
,
message
:
ReasonRulesMessage
}]
}
>
<
Input
.
TextArea
allowClear
rows=
{
3
}
maxLength=
{
60
}
placeholder=
{
ReasonPlaceholder
}
/>
</
Form
.
Item
>
:
null
}
</
Form
>
</
Modal
>
)
}
CustomizedModal
.
defaultProps
=
{
visible
:
false
,
radioGroup
:
[],
onSubmit
:
(
values
)
=>
{},
onCancel
:
(
visible
)
=>
{},
}
export
default
CustomizedModal
;
src/pages/order/components/customizedModal/index.tsx
View file @
a01929a6
...
@@ -26,7 +26,7 @@ export interface SubmitFeedback {
...
@@ -26,7 +26,7 @@ export interface SubmitFeedback {
/**
/**
* Radio box checked value
* Radio box checked value
*/
*/
selectedRadio
:
string
|
number
,
isPass
:
string
|
number
,
/**
/**
* Input content
* Input content
*/
*/
...
...
src/pages/order/deliveryPlanCollaboration/deliveryPlanAwait/details.tsx
View file @
a01929a6
This diff is collapsed.
Click to expand it.
src/pages/order/deliveryPlanCollaboration/deliveryPlanAwait/index.tsx
View file @
a01929a6
...
@@ -7,7 +7,7 @@ import React, { useRef } from 'react'
...
@@ -7,7 +7,7 @@ import React, { useRef } from 'react'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
moment
from
'moment'
import
moment
from
'moment'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Button
,
Card
,
Space
,
Tag
}
from
'antd'
import
{
Card
,
Space
,
Tag
}
from
'antd'
import
StandardTable
from
'@/components/StandardTable'
import
StandardTable
from
'@/components/StandardTable'
import
{
ColumnType
}
from
'antd/lib/table'
import
{
ColumnType
}
from
'antd/lib/table'
import
TableOperation
from
'@/components/TableOperation'
import
TableOperation
from
'@/components/TableOperation'
...
...
src/pages/order/deliveryPlanCollaboration/deliveryPlanQuery/details.tsx
View file @
a01929a6
This diff is collapsed.
Click to expand it.
src/pages/order/deliveryPlanCollaboration/deliveryPlanQuery/index.tsx
View file @
a01929a6
...
@@ -63,7 +63,7 @@ const DeliveryPlanCollaborationQuery: React.FC = () => {
...
@@ -63,7 +63,7 @@ const DeliveryPlanCollaborationQuery: React.FC = () => {
...
PlanNumberColumn
,
...
PlanNumberColumn
,
dataIndex
:
'planNo'
,
dataIndex
:
'planNo'
,
key
:
'planNo'
,
key
:
'planNo'
,
render
:
(
text
:
unknown
,
record
:
any
)
=>
<
EyePreview
url=
{
`/memberCenter/order/deliveryPlanCollaboration/query/details?ty=${godBtoa(record.orderType)}&i=${godBtoa(record.id)}
}
`}
>
{
text
}
</
EyePreview
>
render
:
(
text
:
unknown
,
record
:
any
)
=>
<
EyePreview
url=
{
`/memberCenter/order/deliveryPlanCollaboration/query/details?ty=${godBtoa(record.orderType)}&i=${godBtoa(record.id)}`
}
>
{
text
}
</
EyePreview
>
},
},
{
...
PlanSummaryColumn
,
dataIndex
:
'digest'
,
key
:
'digest'
},
{
...
PlanSummaryColumn
,
dataIndex
:
'digest'
,
key
:
'digest'
},
{
...
PlannedStartDateColumn
,
dataIndex
:
'planStartTime'
,
key
:
'planStartTime'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
moment
(
text
).
format
(
'YYYY-MM-DD'
))
},
{
...
PlannedStartDateColumn
,
dataIndex
:
'planStartTime'
,
key
:
'planStartTime'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
moment
(
text
).
format
(
'YYYY-MM-DD'
))
},
...
...
src/pages/order/deliveryPlanManagement/deliveryPlanQuery/details.tsx
View file @
a01929a6
...
@@ -97,7 +97,7 @@ const DeliveryPlanManagementDetails: React.FC = () => {
...
@@ -97,7 +97,7 @@ const DeliveryPlanManagementDetails: React.FC = () => {
setExpandIconColumn
([...
expandIconColumn
,
...
datesExpandIconColumn
])
setExpandIconColumn
([...
expandIconColumn
,
...
datesExpandIconColumn
])
}
}
// 获取计划送货
物料
// 获取计划送货
const
getPlannedDelivery
=
()
=>
{
const
getPlannedDelivery
=
()
=>
{
getOrderDeliveryPlanDetailProductPage
({
getOrderDeliveryPlanDetailProductPage
({
id
,
id
,
...
@@ -139,7 +139,6 @@ const DeliveryPlanManagementDetails: React.FC = () => {
...
@@ -139,7 +139,6 @@ const DeliveryPlanManagementDetails: React.FC = () => {
})
})
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
getDetails
()
getDetails
()
getExternalRoamRecordData
()
getExternalRoamRecordData
()
...
...
src/pages/order/deliveryPlanManagement/deliveryPlanQuery/update.tsx
View file @
a01929a6
...
@@ -57,7 +57,7 @@ const DeliveryPlanManagementUpdate: React.FC = () => {
...
@@ -57,7 +57,7 @@ const DeliveryPlanManagementUpdate: React.FC = () => {
const
[
form
]
=
Form
.
useForm
()
const
[
form
]
=
Form
.
useForm
()
const
datesRef
=
useRef
(
null
)
const
datesRef
=
useRef
(
null
)
const
materialT
ableDataRef
=
useRef
(
null
)
const
t
ableDataRef
=
useRef
(
null
)
const
[
spinning
,
setSpinning
]
=
useState
<
boolean
>
(
false
)
const
[
spinning
,
setSpinning
]
=
useState
<
boolean
>
(
false
)
...
@@ -97,12 +97,12 @@ const DeliveryPlanManagementUpdate: React.FC = () => {
...
@@ -97,12 +97,12 @@ const DeliveryPlanManagementUpdate: React.FC = () => {
// 保存
// 保存
const
save
=
()
=>
{
const
save
=
()
=>
{
form
.
validateFields
().
then
(
values
=>
{
form
.
validateFields
().
then
(
values
=>
{
if
(
_
.
isEmpty
(
materialT
ableDataRef
.
current
))
{
if
(
_
.
isEmpty
(
t
ableDataRef
.
current
))
{
message
.
warning
(
'没有找到可执行计划送货'
)
message
.
warning
(
'没有找到可执行计划送货'
)
return
return
}
}
setSpinning
(
true
)
setSpinning
(
true
)
const
orders
=
materialT
ableDataRef
.
current
.
flatMap
((
item
:
any
)
=>
item
.
orders
).
flatMap
((
o
:
any
)
=>
({
const
orders
=
t
ableDataRef
.
current
.
flatMap
((
item
:
any
)
=>
item
.
orders
).
flatMap
((
o
:
any
)
=>
({
...
o
,
...
o
,
planDays
:
Object
.
keys
(
o
).
filter
((
f
:
any
)
=>
f
.
startsWith
(
'$'
)).
map
((
p
:
any
)
=>
o
[
p
])
planDays
:
Object
.
keys
(
o
).
filter
((
f
:
any
)
=>
f
.
startsWith
(
'$'
)).
map
((
p
:
any
)
=>
o
[
p
])
}))
}))
...
@@ -125,11 +125,11 @@ const DeliveryPlanManagementUpdate: React.FC = () => {
...
@@ -125,11 +125,11 @@ const DeliveryPlanManagementUpdate: React.FC = () => {
// 对应日期填入的送货数量
// 对应日期填入的送货数量
const
inputChange
=
(
val
:
any
,
text
:
any
,
record
:
any
)
=>
{
const
inputChange
=
(
val
:
any
,
text
:
any
,
record
:
any
)
=>
{
let
{
day
}
=
text
let
{
day
}
=
text
let
dataArr
=
JSON
.
parse
(
JSON
.
stringify
(
materialT
ableDataRef
.
current
))
let
dataArr
=
JSON
.
parse
(
JSON
.
stringify
(
t
ableDataRef
.
current
))
let
index
=
dataArr
.
findIndex
(
f
=>
f
.
skuId
===
record
.
skuId
)
let
index
=
dataArr
.
findIndex
(
f
=>
f
.
skuId
===
record
.
skuId
)
let
childIndex
=
dataArr
[
index
].
orders
.
findIndex
(
f
=>
f
.
orderProductId
===
record
.
orderProductId
)
let
childIndex
=
dataArr
[
index
].
orders
.
findIndex
(
f
=>
f
.
orderProductId
===
record
.
orderProductId
)
dataArr
[
index
].
orders
[
childIndex
][
`$
${
day
}
`
].
planCount
=
val
dataArr
[
index
].
orders
[
childIndex
][
`$
${
day
}
`
].
planCount
=
val
materialT
ableDataRef
.
current
=
dataArr
t
ableDataRef
.
current
=
dataArr
setTableData
(
dataArr
)
setTableData
(
dataArr
)
}
}
...
@@ -166,7 +166,7 @@ const DeliveryPlanManagementUpdate: React.FC = () => {
...
@@ -166,7 +166,7 @@ const DeliveryPlanManagementUpdate: React.FC = () => {
orders
:
item
.
orders
.
map
(
o
=>
({
...
o
,
...
integrationArrToObj
(
o
.
planDays
)
}))
orders
:
item
.
orders
.
map
(
o
=>
({
...
o
,
...
integrationArrToObj
(
o
.
planDays
)
}))
}
}
})
})
materialT
ableDataRef
.
current
=
assemble
t
ableDataRef
.
current
=
assemble
setTableData
(
assemble
)
setTableData
(
assemble
)
}
}
})
})
...
...
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