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
a0e5646b
Commit
a0e5646b
authored
Apr 13, 2022
by
许佳敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '20418order' into 'v2-220418'
显示字段不对,协同生成送货单单功能弥补 See merge request linkseeks-design/pro-platform!243
parents
00c2b088
b7c26878
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
61 deletions
+82
-61
AddressDrawer.tsx
src/components/AddressDrawer/AddressDrawer.tsx
+0
-1
DeliveryAddFactory.ts
src/pages/order/assets/factory/DeliveryAddFactory.ts
+7
-3
HandleFormSubmit.ts
src/pages/order/assets/handles/HandleFormSubmit.ts
+42
-38
add.tsx
src/pages/order/deliveryNotice/synergy/add.tsx
+19
-9
index.tsx
...der/deliveryPlanCollaboration/deliveryPlanQuery/index.tsx
+14
-10
No files found.
src/components/AddressDrawer/AddressDrawer.tsx
View file @
a0e5646b
...
...
@@ -86,7 +86,6 @@ function AddressDrawer(props: AddressDrawerProps) {
} else if (showDefault) {
// 如果没有默认值,且设置了 showDefault
const target = data.find(v => v.isDefault === 1)
setValue(target)
onChange(target)
}
});
...
...
src/pages/order/assets/factory/DeliveryAddFactory.ts
View file @
a0e5646b
import
{
FormInstance
}
from
"antd"
;
import
{
DeliveryNoteAddService
,
ReceivingNoteB2BAddService
}
from
"../handles/HandleFormSubmit"
;
export
enum
DeliveryNoteAddType
{
B2B
=
1
,
SRM
=
2
}
export
class
DeliveryAddFactory
{
static
instance
;
static
getInstance
(
target
:
'B2B'
|
'SRM'
=
'SRM'
)
{
if
(
target
===
'SRM'
)
{
static
getInstance
(
target
:
DeliveryNoteAddType
=
2
)
{
if
(
target
===
DeliveryNoteAddType
.
SRM
)
{
return
new
DeliveryNoteAddService
();
}
if
(
target
===
'B2B'
)
{
if
(
target
===
DeliveryNoteAddType
.
B2B
)
{
return
new
ReceivingNoteB2BAddService
();
}
...
...
src/pages/order/assets/handles/HandleFormSubmit.ts
View file @
a0e5646b
...
...
@@ -79,48 +79,52 @@ export class HandleFormSubmit {
})
}
formatField
(
data
)
{
let
formField
=
{
digest
:
data
?.
digest
,
remark
:
data
?.
remark
,
member
:
{
buyerMemberId
:
data
?.
buyerMemberName
,
buyerMemberName
:
data
?.
buyerMemberName
,
buyerRoleId
:
data
?.
vendorMemberId
,
roleType
:
2
,
name
:
data
?.
buyerMemberName
},
deliveryTime
:
data
?.
deliveryTime
?
moment
(
data
?.
deliveryTime
)
:
moment
().
startOf
(
'day'
),
deliveryRangeTime
:
[
moment
().
startOf
(
'day'
),
moment
().
endOf
(
'day'
)
],
deliveryVO
:
{
...
data
?.
deliverVO
,
shipperName
:
data
?.
deliverVO
.
consignee
,
fullAddress
:
data
?.
deliverVO
.
provinceName
+
data
?.
deliverVO
.
cityName
+
data
?.
deliverVO
.
districtName
+
data
?.
deliverVO
.
streetName
??
''
},
receiveVO
:
{
...
data
?.
receiverBO
,
receiverName
:
data
?.
receiverBO
.
consignee
,
fullAddress
:
data
?.
receiverBO
.
provinceName
+
data
?.
receiverBO
.
cityName
+
data
?.
receiverBO
.
districtName
+
data
?.
receiverBO
.
streetName
??
''
},
"executorVO.phone"
:
data
?.
executorVO
.
phone
,
sendTime
:
moment
(
data
?.
sendTime
),
"executorVO.carNumbers"
:
data
?.
executorVO
.
carNumbers
,
"receiverBO.phone"
:
data
?.
receiverBO
.
phone
,
logisticsNo
:
data
?.
logisticsNo
,
logisticsCompanyInt
:
{
label
:
data
?.
logisticsCompany
,
value
:
data
?.
logisticsCompanyId
},
outerHistoryList
:
data
?.
outerHistoryList
,
deliveryNo
:
data
?.
deliveryNo
}
return
formField
}
getDetailById
(
id
:
string
)
{
///order/delivery/order/detail
return
getOrderDeliveryOrderDetail
({
id
}).
then
(
res
=>
{
const
data
=
res
.
data
let
formField
=
{
digest
:
data
.
digest
,
remark
:
data
.
remark
,
member
:
{
buyerMemberId
:
data
.
buyerMemberId
,
buyerMemberName
:
data
.
buyerMemberName
,
buyerRoleId
:
data
.
buyerRoleId
,
roleType
:
2
,
name
:
data
.
buyerMemberName
},
deliveryTime
:
moment
(
data
.
deliveryTime
),
deliveryRangeTime
:
[
moment
(
"1990-10-10 "
+
data
.
deliveryStartTime
),
moment
(
"1990-10-10 "
+
data
.
deliveryEndTime
),
],
deliveryVO
:
{
...
data
.
deliverVO
,
shipperName
:
data
.
deliverVO
.
consignee
,
fullAddress
:
data
.
deliverVO
.
provinceName
+
data
.
deliverVO
.
cityName
+
data
.
deliverVO
.
districtName
+
data
.
deliverVO
.
streetName
??
''
},
receiveVO
:
{
...
data
.
receiverBO
,
receiverName
:
data
.
receiverBO
.
consignee
,
fullAddress
:
data
.
receiverBO
.
provinceName
+
data
.
receiverBO
.
cityName
+
data
.
receiverBO
.
districtName
+
data
.
receiverBO
.
streetName
??
''
},
deliveryType
:
data
.
deliveryType
,
"executorVO.phone"
:
data
.
executorVO
.
phone
,
sendTime
:
moment
(
data
.
sendTime
),
"executorVO.carNumbers"
:
data
.
executorVO
.
carNumbers
,
"receiverBO.phone"
:
data
.
receiverBO
.
phone
,
logisticsNo
:
data
.
logisticsNo
,
logisticsCompanyInt
:
{
label
:
data
.
logisticsCompany
,
value
:
data
.
logisticsCompanyId
},
outerHistoryList
:
data
.
outerHistoryList
,
deliveryNo
:
data
.
deliveryNo
}
let
formField
=
this
.
formatField
(
data
);
return
formField
})
}
...
...
src/pages/order/deliveryNotice/synergy/add.tsx
View file @
a0e5646b
...
...
@@ -24,6 +24,8 @@ import LogisticsCompanyMerchantsSelect from '@/components/LogisticsCompanySelect
import
{
values
}
from
'lodash'
;
import
{
DeliveryNumColumn
,
OrderNumColumn
}
from
'../../constants/table-column'
;
import
{
DeliveryAddFactory
}
from
'../../assets/factory/DeliveryAddFactory'
;
import
{
useLocation
}
from
'umi'
;
import
{
SourceTypeEnum
}
from
'../../constants/SourceTypeEnum'
;
const
ContentBoxItem
=
ContentBox
.
BaseInfoItem
;
...
...
@@ -33,8 +35,11 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
const
[
tableDataSource
,
setTableDataSource
]
=
useState
();
const
[
form
]
=
Form
.
useForm
()
const
service
=
DeliveryAddFactory
.
getInstance
(
'SRM'
);
const
location
=
useLocation
()
const
{
time
,
ot
}
=
(
location
as
any
).
query
const
service
=
DeliveryAddFactory
.
getInstance
(
Number
(
ot
));
service
.
setForm
(
form
)
const
[
anchors
,
setAnchors
]
=
useState
<
AnchorsItem
[]
>
([
BaseInfo
,
...
...
@@ -45,13 +50,18 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
])
useEffect
(()
=>
{
const
DELIVERY_NOTICE_PATH
:
any
=
JSON
.
parse
(
localStorage
.
getItem
(
'DELIVERY_NOTICE_PATH'
))
const
data
=
DELIVERY_NOTICE_PATH
?.
time
let
formFeils
=
service
.
formatField
(
data
)
form
.
setFieldsValue
({
sourceType
:
0
,
deliveryRangeTime
:
[
moment
().
startOf
(
'day'
).
add
(
'hour'
,
8
),
moment
().
startOf
(
'day'
).
add
(
'hour'
,
12
)
]
sourceType
:
SourceTypeEnum
.
PlanAdd
,
...
formFeils
})
},
[])
const
handleSubmit
=
useCallback
(()
=>
{
...
...
@@ -87,7 +97,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<
Form
form=
{
form
}
>
<
FormItem
name=
"sourceType"
>
<
FormItem
hidden
name=
"sourceType"
>
<
Input
type=
"hidden"
/>
</
FormItem
>
...
...
@@ -127,7 +137,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
required
()
]
}
label=
{
DeliveryDate
}
name=
"deliveryTime"
>
<
DatePickerSelect
defualtToday=
{
true
}
className=
'w-full'
/>
<
DatePickerSelect
d
isabled=
{
true
}
d
efualtToday=
{
true
}
className=
'w-full'
/>
</
FormItem
>
<
FormItem
...
...
src/pages/order/deliveryPlanCollaboration/deliveryPlanQuery/index.tsx
View file @
a0e5646b
...
...
@@ -3,11 +3,11 @@
* @author: Gavin
* @description:
*/
import
React
,
{
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
moment
from
'moment'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
Space
,
Tag
}
from
'antd'
import
React
,
{
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
moment
from
'moment'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
Space
,
Tag
}
from
'antd'
import
StandardTable
from
'@/components/StandardTable'
import
{
ColumnType
}
from
'antd/lib/table'
import
TableOperation
from
'@/components/TableOperation'
...
...
@@ -23,7 +23,7 @@ import { getOrderDeliveryPlanVendorPage } from '@/services/OrderNewV2Api'
const
tagStatus
=
new
TagStatus
()
const
statusTxt
=
new
Map
([[
1
,
'待提交'
],
[
2
,
'待确认'
],
[
3
,
'待修订'
],
[
4
,
'已确认'
],[
5
,
'已删除'
]])
const
statusTxt
=
new
Map
([[
1
,
'待提交'
],
[
2
,
'待确认'
],
[
3
,
'待修订'
],
[
4
,
'已确认'
],
[
5
,
'已删除'
]])
const
DeliveryPlanCollaborationQuery
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
...
...
@@ -47,8 +47,12 @@ const DeliveryPlanCollaborationQuery: React.FC = () => {
}
const
operationHandler
=
{
'查看'
:
()
=>
history
.
push
(
`/memberCenter/order/deliveryPlanCollaboration/query/details?ty=
${
godBtoa
(
record
.
orderType
)}
&i=
${
godBtoa
(
record
.
id
)}
`
),
'生成送货通知单'
:
()
=>
{
console
.
log
(
'生成送货通知单 :>> '
,)
},
'生成送货单'
:
()
=>
{
console
.
log
(
'生成送货通知单 :>> '
,)
},
'生成送货通知单'
:
()
=>
{
history
.
push
(
`/memberCenter/order/deliveryPlanCollaboration/query/details?ty=
${
godBtoa
(
record
.
orderType
)}
&i=
${
godBtoa
(
record
.
id
)}
`
)
},
'生成送货单'
:
()
=>
{
history
.
push
(
`/memberCenter/order/deliveryPlanCollaboration/query/details?ty=
${
godBtoa
(
record
.
orderType
)}
&i=
${
godBtoa
(
record
.
id
)}
`
)
},
}
return
(
<
TableOperation
...
...
@@ -66,7 +70,7 @@ const DeliveryPlanCollaborationQuery: React.FC = () => {
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'
},
{
...
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'
))
},
{
...
PlannedEndDateColumn
,
dataIndex
:
'planEndTime'
,
key
:
'planEndTime'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
moment
(
text
).
format
(
'YYYY-MM-DD'
))
},
{
...
SupplyMemberColumn
,
dataIndex
:
'memberName'
,
key
:
'memberName'
},
{
...
...
@@ -102,7 +106,7 @@ const DeliveryPlanCollaborationQuery: React.FC = () => {
return
(
<
PageHeaderWrapper
>
<
Card
>
<
Card
>
<
StandardTable
// keepAlive={false}
currentRef=
{
ref
}
...
...
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