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
076490bc
Commit
076490bc
authored
Apr 14, 2022
by
前端-李俊鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 计划生成需求单调整
parent
ab867c27
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
31 deletions
+32
-31
harver-material.tsx
src/pages/order/assets/context/harver-material.tsx
+5
-5
index.tsx
...eliveryNoticeAwaitB2B/components/AddEditContent/index.tsx
+14
-13
index.tsx
...eliveryNoticeAwaitSRM/components/AddEditContent/index.tsx
+13
-13
No files found.
src/pages/order/assets/context/harver-material.tsx
View file @
076490bc
...
...
@@ -13,15 +13,16 @@ export const HarvestMaterialContextProvider = HarvestMaterialContext.Provider
export
const
HarvestMaterialContextConsumer
=
HarvestMaterialContext
.
Consumer
/**
*
*
* @param props Table修个的时候,需要参数
* @returns
* @returns
*/
export
function
HarvestMaterialInput
(
props
:
{
value
:
any
,
//input 显示的值
index
:
number
// table 当前的 index下标
keyUp
:
string
// dataSource 对应的row key
min
?:
number
disabled
?:
boolean
})
{
const
context
=
useContext
(
HarvestMaterialContext
);
...
...
@@ -35,7 +36,7 @@ export function HarvestMaterialInput(props: {
saveValue
(
targetVal
)
return
;
}
// 存在小数点 且 字符串必须大于 . +1 才执行
// 存在小数点 且 字符串必须大于 . +1 才执行
if
(
targetVal
.
includes
(
'.'
)
&&
targetVal
.
length
!=
targetVal
.
indexOf
(
'.'
))
{
const
reg
=
new
RegExp
(
"((^[1-9][0-9]{0,8})+(.?[0-9]{1,3})?$)"
)
const
test
=
reg
.
test
(
targetVal
)
...
...
@@ -81,4 +82,4 @@ export function HarvestMaterialDelete(props: {
return
(
<
Button
onClick=
{
handleClick
}
type=
"link"
>
删除
</
Button
>
)
}
\ No newline at end of file
}
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/components/AddEditContent/index.tsx
View file @
076490bc
...
...
@@ -25,6 +25,7 @@ type PropsType = {
type
:
'add'
|
'edit'
;
id
?:
string
;
planData
?:
any
;
btnCode
:
string
;
}
enum
PAGE_TYPE
{
...
...
@@ -42,7 +43,7 @@ const formItemLayout = {
wrapperCol
:
{
span
:
18
}
}
const
DeliveryNoticeManagementAwaitB2BDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
,
planData
})
=>
{
const
DeliveryNoticeManagementAwaitB2BDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
,
planData
,
btnCode
})
=>
{
const
[
form
]
=
Form
.
useForm
()
const
[
iAnchors
,
setiAnchors
]
=
useState
<
AnchorsItem
[]
>
([
Circulation
,
...
...
@@ -149,20 +150,19 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
}
else
{
// 通过送货计划生成时
if
(
planData
)
{
const
firstProduct
=
planData
.
products
?.[
0
]
||
{}
const
receivingAddress
=
{
provinceName
:
firstProduct
.
provinceName
,
cityName
:
firstProduct
.
cityName
,
districtName
:
firstProduct
.
districtName
,
streetName
:
firstProduct
.
streetName
,
address
:
firstProduct
.
address
,
phone
:
firstProduct
.
phone
,
consignee
:
firstProduct
.
consignee
,
consigneeId
:
firstProduct
.
consigneeId
,
fullAddress
:
`
${
firstProduct
.
provinceName
||
''
}${
firstProduct
.
cityName
||
''
}${
firstProduct
.
districtName
||
''
}${
firstProduct
.
streetName
||
''
}${
firstProduct
.
address
||
''
}
`
provinceName
:
planData
.
provinceName
,
cityName
:
planData
.
cityName
,
districtName
:
planData
.
districtName
,
streetName
:
planData
.
streetName
,
address
:
planData
.
address
,
phone
:
planData
.
phone
,
consignee
:
planData
.
consignee
,
consigneeId
:
planData
.
consigneeId
,
fullAddress
:
`
${
planData
.
provinceName
||
''
}${
planData
.
cityName
||
''
}${
planData
.
districtName
||
''
}${
planData
.
streetName
||
''
}${
planData
.
address
||
''
}
`
}
form
.
setFieldsValue
({
digest
:
`
${
planData
.
deliveryTime
}${
firstProduct
.
productName
||
''
}
送货通知`
,
digest
:
`
${
planData
.
deliveryTime
}${
planData
.
productName
||
''
}
送货通知`
,
deliveryTime
:
moment
(
planData
.
deliveryTime
),
receivingAddress
,
member
:
{
...
...
@@ -218,7 +218,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
onBack=
{
()
=>
history
.
goBack
()
}
anchors=
{
iAnchors
}
extra=
{
<
AuthButton
btnCode=
''
menuCode=
''
>
<
AuthButton
btnCode=
{
btnCode
}
>
<
Button
loading=
{
loading
}
onClick=
{
handleSubmit
}
type=
'primary'
>
提交
</
Button
>
</
AuthButton
>
}
...
...
@@ -294,6 +294,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
{
...
formItemLayout
}
label=
{
DeliveryTime
}
name=
'deliveryStartEndTime'
initialValue=
{
[
moment
(
'08:00'
,
'HH:mm'
),
moment
(
'12:00'
,
'HH:mm'
)]
}
rules=
{
[
{
required
:
true
,
message
:
`请选择${DeliveryTime}`
}
]
}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/components/AddEditContent/index.tsx
View file @
076490bc
...
...
@@ -26,6 +26,7 @@ type PropsType = {
type
:
'add'
|
'edit'
;
id
?:
string
;
planData
?:
any
;
btnCode
:
string
;
}
enum
PAGE_TYPE
{
...
...
@@ -43,7 +44,7 @@ const formItemLayout = {
wrapperCol
:
{
span
:
18
}
}
const
DeliveryNoticeManagementAwaitSRMDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
,
planData
})
=>
{
const
DeliveryNoticeManagementAwaitSRMDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
,
planData
,
btnCode
})
=>
{
const
[
form
]
=
Form
.
useForm
()
const
[
iAnchors
,
setiAnchors
]
=
useState
<
AnchorsItem
[]
>
([
Circulation
,
...
...
@@ -150,20 +151,19 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
}
else
{
// 通过送货计划生成时
if
(
planData
)
{
const
firstProduct
=
planData
.
products
?.[
0
]
||
{}
const
receivingAddress
=
{
provinceName
:
firstProduct
.
provinceName
,
cityName
:
firstProduct
.
cityName
,
districtName
:
firstProduct
.
districtName
,
streetName
:
firstProduct
.
streetName
,
address
:
firstProduct
.
address
,
phone
:
firstProduct
.
phone
,
consignee
:
firstProduct
.
consignee
,
consigneeId
:
firstProduct
.
consigneeId
,
fullAddress
:
`
${
firstProduct
.
provinceName
||
''
}${
firstProduct
.
cityName
||
''
}${
firstProduct
.
districtName
||
''
}${
firstProduct
.
streetName
||
''
}${
firstProduct
.
address
||
''
}
`
provinceName
:
planData
.
provinceName
,
cityName
:
planData
.
cityName
,
districtName
:
planData
.
districtName
,
streetName
:
planData
.
streetName
,
address
:
planData
.
address
,
phone
:
planData
.
phone
,
consignee
:
planData
.
consignee
,
consigneeId
:
planData
.
consigneeId
,
fullAddress
:
`
${
planData
.
provinceName
||
''
}${
planData
.
cityName
||
''
}${
planData
.
districtName
||
''
}${
planData
.
streetName
||
''
}${
planData
.
address
||
''
}
`
}
form
.
setFieldsValue
({
digest
:
`
${
planData
.
deliveryTime
}${
firstProduct
.
productName
||
''
}
送货通知`
,
digest
:
`
${
planData
.
deliveryTime
}${
planData
.
productName
||
''
}
送货通知`
,
deliveryTime
:
moment
(
planData
.
deliveryTime
),
receivingAddress
,
member
:
{
...
...
@@ -219,7 +219,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
onBack=
{
()
=>
history
.
goBack
()
}
anchors=
{
iAnchors
}
extra=
{
<
AuthButton
btnCode=
''
menuCode=
''
>
<
AuthButton
btnCode=
{
btnCode
}
>
<
Button
loading=
{
loading
}
onClick=
{
handleSubmit
}
type=
'primary'
>
提交
</
Button
>
</
AuthButton
>
}
...
...
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