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
d16a42c7
Commit
d16a42c7
authored
May 07, 2022
by
许佳敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '20418order' into 'v2-220418'
B2B送货通知单 物料选择 See merge request linkseeks-design/pro-platform!628
parents
de60ef92
04b555e2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
46 deletions
+54
-46
DeliveryGoodTableSelect.tsx
...nents/DeliveryGoodTableSelect/DeliveryGoodTableSelect.tsx
+3
-5
add.tsx
src/pages/order/deliveryNotice/manageSRM/add.tsx
+22
-13
index.tsx
...eliveryNoticeAwaitB2B/components/AddEditContent/index.tsx
+15
-14
index.tsx
...eliveryNoticeAwaitSRM/components/AddEditContent/index.tsx
+14
-14
No files found.
src/pages/order/components/DeliveryGoodTableSelect/DeliveryGoodTableSelect.tsx
View file @
d16a42c7
...
...
@@ -25,9 +25,6 @@ function DeliveryGoodTableModal(props: DeliveryGoodTableModalProps) {
const
{
onChange
,
form
,
disabled
,
orderType
,
title
=
'选择送货物料'
,
value
}
=
props
;
console
.
log
(
value
);
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
service
=
DeliveryNoticeOrderFactory
.
getInstance
()
const
[
tableData
,
setTableData
]
=
useState
([])
...
...
@@ -36,12 +33,13 @@ function DeliveryGoodTableModal(props: DeliveryGoodTableModalProps) {
const
handleVisible
=
useCallback
(()
=>
{
setVisible
(
true
)
selectedRowKeys
=
value
},
[
visible
])
},
[
visible
,
value
])
const
handleSubmit
=
useCallback
(()
=>
{
console
.
log
(
selectedRowKeys
);
onChange
(
selectedRowKeys
);
setVisible
(
false
);
},
[
visible
])
},
[
visible
,
value
])
useEffect
(()
=>
{
...
...
src/pages/order/deliveryNotice/manageSRM/add.tsx
View file @
d16a42c7
...
...
@@ -53,15 +53,15 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
Material
,
])
useEffect
(()
=>
{
form
.
setFieldsValue
({
sourceType
:
0
,
deliveryRangeTime
:
[
moment
().
startOf
(
'day'
).
add
(
'hour'
,
8
),
moment
().
startOf
(
'day'
).
add
(
'hour'
,
12
)
]
})
},
[])
//
useEffect(() => {
//
form.setFieldsValue({
//
sourceType: 0,
//
deliveryRangeTime: [
//
moment().startOf('day').add('hour', 8),
//
moment().startOf('day').add('hour', 12)
//
]
//
})
//
}, [])
const
handleSubmit
=
useCallback
(()
=>
{
...
...
@@ -73,6 +73,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
service
.
setTableData
(
tableDataSourceContext
);
service
.
submit
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
handleLeave
(
false
)
setTimeout
(()
=>
{
history
.
go
(
-
1
)
},
1000
);
...
...
@@ -95,9 +96,12 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
>
<
Form
form=
{
form
}
onValuesChange=
{
()
=>
{
handleLeave
()
}
}
onValuesChange=
{
()
=>
{
console
.
log
(
'dada'
);
handleLeave
()
}
}
>
<
FormItem
name=
"sourceType"
>
<
FormItem
name=
"sourceType"
initialValue=
{
0
}
>
<
Input
type=
"hidden"
/>
</
FormItem
>
...
...
@@ -153,7 +157,12 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
rules=
{
[
required
()
]
}
label=
{
DeliveryTime
}
name=
"deliveryRangeTime"
>
label=
{
DeliveryTime
}
name=
"deliveryRangeTime"
initialValue=
{
[
moment
().
startOf
(
'day'
).
add
(
'hour'
,
8
),
moment
().
startOf
(
'day'
).
add
(
'hour'
,
12
)
]
}
>
<
DatePickerSelect
.
RangePicker
className=
"w-full"
picker=
'time'
/>
</
FormItem
>
...
...
@@ -246,7 +255,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
let
atpm
=
JSON
.
parse
(
JSON
.
stringify
(
anchors
));
atpm
.
pop
()
const
ft
=
formatTable
(
value
)
if
(
ft
.
length
>
0
)
{
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/components/AddEditContent/index.tsx
View file @
d16a42c7
...
...
@@ -57,7 +57,7 @@ const getConst = (len = 0) => {
const
DeliveryNoticeManagementAwaitB2BDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
,
planData
,
btnCode
})
=>
{
const
[
form
]
=
Form
.
useForm
()
const
{
renderPrompt
,
handleLeave
}
=
usePrompt
()
const
[
tableDataSource
,
setTableDataSource
]
=
useState
<
any
>
(
[]
)
const
[
tableDataSource
,
setTableDataSource
]
=
useState
<
any
>
(
new
Map
()
)
const
[
tableDataSourceContext
,
setTableDataSourceContext
]
=
useState
([])
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
...
...
@@ -65,20 +65,16 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
const
progressRef
=
useRef
<
HandleType
>
()
const
changeTableSource
=
(
data
=
[])
=>
{
const
r
=
formMapData
(
tableDataSource
,
data
)
setTableDataSource
(
r
);
setTableDataSourceContext
(
data
);
renderProgress
(
data
)
}
const
renderProgress
=
(
data
=
tableDataSource
)
=>
{
const
renderProgress
=
(
data
=
tableDataSource
Context
)
=>
{
const
planCountValues
:
any
=
{}
data
.
forEach
((
item
,
index
)
=>
{
planCountValues
[
`planCount
${
index
}
`
]
=
item
.
planCount
})
progressRef
.
current
.
render
(
form
,
{
tableDataSource
:
data
,
...
planCountValues
})
progressRef
.
current
.
render
(
form
,
{
tableDataSource
Context
:
data
,
...
planCountValues
})
}
const
handleSubmit
=
()
=>
{
...
...
@@ -90,7 +86,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
receivingAddress
,
remark
})
=>
{
if
(
tableDataSource
.
some
(
item
=>
!
item
.
planCount
))
{
if
(
tableDataSource
Context
.
some
(
item
=>
!
item
.
planCount
))
{
message
.
warning
(
'请填写计划送货数量'
)
return
}
...
...
@@ -104,7 +100,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
deliveryTime
:
moment
(
deliveryTime
).
format
(
'YYYY-MM-DD'
),
deliveryStartTime
:
moment
(
deliveryStartEndTime
[
0
]).
format
(
'HH:mm'
),
deliveryEndTime
:
moment
(
deliveryStartEndTime
[
1
]).
format
(
'HH:mm'
),
products
:
tableDataSource
,
products
:
tableDataSource
Context
,
remark
}
const
requestApi
=
id
?
postOrderDeliveryNoticeOrderUpdate
:
postOrderDeliveryNoticeOrderB2bCreate
...
...
@@ -124,9 +120,14 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
}
const
handleRemoveMaterialTableRow
=
(
i
:
number
)
=>
{
const
source
:
any
[]
=
tableDataSource
;
const
newSource
=
source
.
splice
(
i
,
0
)
changeTableSource
(
newSource
);
const
source
:
any
[]
=
JSON
.
parse
(
JSON
.
stringify
(
tableDataSourceContext
));
source
.
splice
(
i
,
1
);
const
r
=
formMapData
(
tableDataSource
,
source
)
setTableDataSource
(
r
);
changeTableSource
(
source
);
}
const
getDetail
=
async
()
=>
{
...
...
@@ -314,7 +315,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
{ required: true, message: `
请选择
$
{
ReceivingAddress
}
` }
]}
>
<ReceiverAddress disabled />
<ReceiverAddress disabled
hiddenBtn={true}
/>
</Form.Item>
<Form.Item
...
...
@@ -353,7 +354,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
'receivingAddress': addr
})
}
console.log(value);
setTableDataSource(value)
changeTableSource(ft)
}}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/components/AddEditContent/index.tsx
View file @
d16a42c7
...
...
@@ -60,7 +60,7 @@ const getConst = (len = 0) => {
const
DeliveryNoticeManagementAwaitSRMDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
,
planData
,
btnCode
})
=>
{
const
[
form
]
=
Form
.
useForm
()
const
{
renderPrompt
,
handleLeave
}
=
usePrompt
()
const
[
tableDataSource
,
setTableDataSource
]
=
useState
<
any
>
(
[]
)
const
[
tableDataSource
,
setTableDataSource
]
=
useState
<
any
>
(
new
Map
()
)
const
[
tableDataSourceContext
,
setTableDataSourceContext
]
=
useState
([])
...
...
@@ -69,21 +69,16 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
const
progressRef
=
useRef
<
HandleType
>
()
const
changeTableSource
=
(
data
=
[])
=>
{
const
r
=
formMapData
(
tableDataSource
,
data
)
setTableDataSource
(
r
);
setTableDataSourceContext
(
data
);
renderProgress
(
data
)
}
const
renderProgress
=
(
data
=
tableDataSource
)
=>
{
const
renderProgress
=
(
data
=
tableDataSource
Context
)
=>
{
const
planCountValues
:
any
=
{}
data
.
forEach
((
item
,
index
)
=>
{
planCountValues
[
`planCount
${
index
}
`
]
=
item
.
planCount
})
progressRef
.
current
.
render
(
form
,
{
tableDataSource
:
data
,
...
planCountValues
})
progressRef
.
current
.
render
(
form
,
{
tableDataSource
Context
:
data
,
...
planCountValues
})
}
const
handleSubmit
=
()
=>
{
...
...
@@ -95,7 +90,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
receivingAddress
,
remark
})
=>
{
if
(
tableDataSource
.
some
(
item
=>
!
item
.
planCount
))
{
if
(
tableDataSource
Context
.
some
(
item
=>
!
item
.
planCount
))
{
message
.
warning
(
'请填写计划送货数量'
)
return
}
...
...
@@ -109,7 +104,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
deliveryTime
:
moment
(
deliveryTime
).
format
(
'YYYY-MM-DD'
),
deliveryStartTime
:
moment
(
deliveryStartEndTime
[
0
]).
format
(
'HH:mm'
),
deliveryEndTime
:
moment
(
deliveryStartEndTime
[
1
]).
format
(
'HH:mm'
),
products
:
tableDataSource
,
products
:
tableDataSource
Context
,
remark
}
const
requestApi
=
id
?
postOrderDeliveryNoticeOrderUpdate
:
postOrderDeliveryNoticeOrderSrmCreate
...
...
@@ -127,10 +122,15 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
}
const
handleRemoveMaterialTableRow
=
(
i
:
number
)
=>
{
const
source
:
any
[]
=
tableDataSourceContext
;
const
newSource
=
source
.
splice
(
i
,
0
)
changeTableSource
(
newSource
)
const
source
:
any
[]
=
JSON
.
parse
(
JSON
.
stringify
(
tableDataSourceContext
));
source
.
splice
(
i
,
1
)
const
r
=
formMapData
(
tableDataSource
,
source
)
console
.
log
(
r
);
setTableDataSource
(
r
);
changeTableSource
(
source
)
}
const
getDetail
=
async
()
=>
{
...
...
@@ -362,7 +362,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
'receivingAddress': addr
})
}
setTableDataSource(value)
changeTableSource(ft)
...
...
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