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
黄庭坚
jinfa-platform
Commits
0e988912
Commit
0e988912
authored
Apr 15, 2022
by
rainbowmorel@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改一些bug
parent
bb8611e8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
345 additions
and
25 deletions
+345
-25
receivingNote.ts
config/routes/orderRoute/receivingNote.ts
+10
-0
package.json
package.json
+1
-0
DeliveryNoteService.ts
src/pages/order/assets/handles/DeliveryNoteService.ts
+52
-1
add.tsx
src/pages/order/deliveryNotice/manageB2B/add.tsx
+1
-1
edit.tsx
src/pages/order/deliveryNotice/manageB2B/edit.tsx
+2
-3
add.tsx
src/pages/order/receivingNote/deliveryNoteManage/add.tsx
+8
-18
edit.tsx
src/pages/order/receivingNote/deliveryNoteManage/edit.tsx
+269
-0
details.tsx
src/pages/order/receivingNote/deliveryNoteQuery/details.tsx
+2
-2
No files found.
config/routes/orderRoute/receivingNote.ts
View file @
0e988912
...
...
@@ -53,6 +53,16 @@ const ReceivingNote = [
hideInMenu
:
true
,
noMargin
:
true
},
{
/** 收货单编辑*/
path
:
'/memberCenter/order/receivingNote/deliveryNoteManage/edit'
,
name
:
'收货单编辑'
,
component
:
'@/pages/order/receivingNote/deliveryNoteManage/edit'
,
hideInMenu
:
true
,
noMargin
:
true
},
]
}
...
...
package.json
View file @
0e988912
...
...
@@ -58,6 +58,7 @@
"start:v2-220418"
:
"cross-env PRO_ENV=v2-220418 yarn start"
,
"start-fast"
:
"cross-env NODE_OPTIONS=--max_old_space_size=4096 UMI_ENV=local umi dev"
,
"start-fast:v2-220418"
:
"cross-env PRO_ENV=v2-220418 yarn start-fast"
},
"lint-staged"
:
{
"*.{js,jsx,less,md,json}"
:
[
...
...
src/pages/order/assets/handles/DeliveryNoteService.ts
View file @
0e988912
...
...
@@ -8,6 +8,7 @@ import {
GetOrderReceiveOrderDetailResponse
,
getOrderReceiveOrderDetailProductPage
}
from
'@/services/OrderNewV2Api'
;
import
moment
from
'moment'
;
/**
* 送货单服务基类
...
...
@@ -26,10 +27,60 @@ class NoteSrmService {
return
getOrderDeliveryOrderDetail
({
id
}).
then
(
res
=>
{
return
res
.
data
})
}
formatField
(
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
:
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: {
...data?.executorVO,
fullAddress: data?.executorVO?.provinceName ?? '' + data?.executorVO?.cityName ?? '' + data?.executorVO?.districtName ?? '' + data?.executorVO?.streetName ?? ''
},
"executorVO.consignee": data?.executorVO?.consignee,
"executorVO.phone": data?.executorVO?.phone,
sendTime: data?.sendTime ? moment(data?.sendTime) : moment().startOf('day'),
"executorVO.carNumbers": data?.executorVO?.carNumbers,
"receiverBO.phone": data?.receiverBO?.phone,
logisticsNo: data?.logisticsNo,
logisticsCompanyInt: {
label: data?.logisticsCompany,
value: data?.logisticsCompanyId
},
deliveryType: data?.deliveryType,
outerHistoryList: data?.outerHistoryList,
deliveryNo: data?.deliveryNo
}
console.log(formField);
return formField
}
getDetailInfoProductById(id: string, current: string = "1", pageSize: string = "10") {
return getOrderDeliveryOrderDetailProductPage({
id,
...
...
@@ -68,7 +119,7 @@ class NoteReceiveService extends NoteSrmService {
return getOrderReceiveOrderDetail({
id
}).then(res => {
return
res
.
data
return
this.formatField(res.data)
})
}
...
...
src/pages/order/deliveryNotice/manageB2B/add.tsx
View file @
0e988912
...
...
@@ -185,8 +185,8 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
required
()
]
}
label=
{
ReceivingAddress
}
name=
"receiveVO"
>
<
ReceiverAddress
formatValue=
{
addrFormatValue
}
/>
</
FormItem
>
...
...
src/pages/order/deliveryNotice/manageB2B/edit.tsx
View file @
0e988912
...
...
@@ -50,11 +50,11 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
form
.
setFieldsValue
({
sourceType
:
0
,
id
:
id
})
service
.
getDetailById
(
id
).
then
(
res
=>
{
form
.
setFieldsValue
(
res
)
setOuterHistoryList
(
res
.
outerHistoryList
)
setOuterHistoryList
(
res
?
.
outerHistoryList
)
})
service
.
getOrderDeliveryOrderDetailProductPage
({
id
}).
then
(
res
=>
{
setTableDataSource
(
res
.
data
)
setTableDataSource
(
res
?
.
data
)
})
},
[
id
])
...
...
@@ -190,7 +190,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
<
ReceiverAddress
disabled=
{
true
}
formatValue=
{
addrFormatValue
}
/>
</
FormItem
>
...
...
src/pages/order/receivingNote/deliveryNoteManage/add.tsx
View file @
0e988912
...
...
@@ -15,7 +15,7 @@ import { HarvestMaterialContextProvider, HarvestMaterialInput } from '../../asse
import
{
DeliveryNoteB2bUploadService
,
ReceiveOrderCreate
,
ReceivingNoteAddService
}
from
"../../assets/handles/HandleFormSubmit"
import
NoteFactoryService
from
"../../assets/handles/DeliveryNoteService"
import
{
RoleSelect
}
from
"@/components/RoleSelect"
import
{
AddressDrawer
,
ShipperAddress
}
from
"@/components/AddressDrawer"
import
{
AddressDrawer
,
ReceiverAddress
,
ShipperAddress
}
from
"@/components/AddressDrawer"
import
{
getLogisticsSelectListReceiverAddress
,
getLogisticsSelectListShipperAddress
,
postLogisticsReceiverAddressAdd
,
postLogisticsReceiverAddressUpdate
,
postLogisticsShipperAddressAdd
,
postLogisticsShipperAddressUpdate
}
from
"@/services/LogisticsV2Api"
import
{
DatePickerSelect
}
from
"@/components/DatePickerSelect"
import
LogisticsCompanyMerchantsSelect
from
"@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect"
...
...
@@ -141,18 +141,7 @@ function DeliveryNoteAddForm() {
required
()
]
}
label=
{
ReceivingAddress
}
name=
"receiveVO"
>
<
AddressDrawer
addressListRequest=
{
(
val
)
=>
{
return
getLogisticsSelectListReceiverAddress
(
val
)
}
}
sumbitRequest=
{
{
update
:
(
val
)
=>
{
return
postLogisticsReceiverAddressUpdate
(
val
)
},
add
:
(
val
)
=>
{
return
postLogisticsReceiverAddressAdd
(
val
)
}
}
}
<
ReceiverAddress
/>
</
FormItem
>
...
...
@@ -203,12 +192,13 @@ function DeliveryNoteAddForm() {
<
ContentBox
title=
{
LogisticsInfo
.
name
}
id=
{
LogisticsInfo
.
key
}
>
<
FormItem
hidden
name=
"deliveryType"
>
<
Input
/>
</
FormItem
>
<
FormItem
label=
{
DeliveryTypeLabel
}
name=
"deliveryType"
>
<>
<
Input
hidden
/>
<
RenaderDeliveryType
/>
</>
label=
{
DeliveryTypeLabel
}
>
<
RenaderDeliveryType
/>
</
FormItem
>
<
FormItem
label=
{
LogisticsCarNoLabel
}
name=
"executorVO.carNumbers"
>
...
...
src/pages/order/receivingNote/deliveryNoteManage/edit.tsx
0 → 100644
View file @
0e988912
import
AnchorPage
,
{
AnchorsItem
}
from
"@/components/AnchorPage"
import
{
BaseInfo
}
from
"@/components/BaseInfo"
import
{
useContext
,
useEffect
,
useState
}
from
"react"
import
{
BillsInfo
,
DeliveryInfo
,
LogisticsInfo
,
Harvest
,
HarvestMaterial
,
ReceiptAddLabel
,
NoteLabel
,
DeliveryTimeLabel
,
ConsigneeTimeLabel
,
LogisticsCompanyLabel
,
LogisticsCarNoLabel
,
LogisticsNoLabel
,
DeliveryAbstractLabel
,
BuyerLabel
,
DeliveryDateLabel
,
DeliveryNameLabel
,
DeliveryPhoneLabel
,
ReceivingAddress
,
DeliveryTypeLabel
,
DeliveryNoLabel
,
ExternalRoamRecord
}
from
'../../constants'
import
{
Button
,
Form
,
Input
,
Radio
,
Table
}
from
'antd'
import
{
FormItem
,
required
}
from
'@/components/FormItem'
import
{
DeliveryNoticeTableColumn
,
ExternalRoamRecordTableColumn
}
from
"../../constants/page-table-column"
import
{
HarvestMaterialContextProvider
,
HarvestMaterialInput
}
from
'../../assets/context'
import
{
DeliveryNoteB2bUploadService
,
ReceiveOrderCreate
,
ReceivingNoteAddService
}
from
"../../assets/handles/HandleFormSubmit"
import
NoteFactoryService
from
"../../assets/handles/DeliveryNoteService"
import
{
RoleSelect
}
from
"@/components/RoleSelect"
import
{
AddressDrawer
,
ReceiverAddress
,
ShipperAddress
}
from
"@/components/AddressDrawer"
import
{
getLogisticsSelectListReceiverAddress
,
getLogisticsSelectListShipperAddress
,
postLogisticsReceiverAddressAdd
,
postLogisticsReceiverAddressUpdate
,
postLogisticsShipperAddressAdd
,
postLogisticsShipperAddressUpdate
}
from
"@/services/LogisticsV2Api"
import
{
DatePickerSelect
}
from
"@/components/DatePickerSelect"
import
LogisticsCompanyMerchantsSelect
from
"@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect"
import
{
DeliveryNumColumn
,
OrderNumColumn
}
from
"../../constants/table-column"
import
{
useLocation
}
from
"umi"
const
{
useForm
}
=
Form
;
const
noteService
=
NoteFactoryService
.
getInstance
(
'receive'
);
const
ContentBox
=
BaseInfo
;
function
DeliveryNoteAddForm
()
{
const
[
tableDataSource
,
setTableDataSource
]
=
useState
<
any
>
([])
const
[
outerHistoryList
,
setOuterHistoryList
]
=
useState
([])
const
location
=
useLocation
()
const
{
id
}
=
(
location
as
any
).
query
const
[
form
]
=
useForm
()
const
service
=
new
ReceiveOrderCreate
(
form
);
service
.
setTableData
(
tableDataSource
)
const
[
anchors
,
setAnchors
]
=
useState
<
AnchorsItem
[]
>
(()
=>
{
return
[
BillsInfo
,
Harvest
,
DeliveryInfo
,
LogisticsInfo
,
HarvestMaterial
]
})
useEffect
(()
=>
{
noteService
.
getDetailInfoProductById
(
id
).
then
(
res
=>
{
setTableDataSource
(
res
.
data
)
});
noteService
.
getDetailInfoById
(
id
).
then
(
res
=>
{
form
.
setFieldsValue
({
deliveryOrderId
:
id
,
...
res
})
setOuterHistoryList
(
res
?.
outerHistoryList
)
})
},
[])
function
handleSubmit
()
{
service
.
submit
().
then
(
res
=>
{
console
.
log
(
res
)
})
}
function
RenaderDeliveryType
({
value
}:
{
value
?:
any
})
{
return
(
<>
<
Input
/>
{
value
===
0
?
'自提'
:
'物流'
}
</>
)
}
return
(
<
AnchorPage
title=
{
ReceiptAddLabel
}
anchors=
{
anchors
}
extra=
{
<
Button
onClick=
{
()
=>
handleSubmit
()
}
type=
"primary"
>
提交
</
Button
>
}
>
<
Form
form=
{
form
}
>
<
FormItem
hidden
name=
"deliveryOrderId"
>
<
Input
/>
</
FormItem
>
<
ContentBox
title=
{
BillsInfo
.
name
}
id=
{
BillsInfo
.
key
}
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
DeliveryAbstractLabel
}
name=
"digest"
>
<
Input
/>
</
FormItem
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
BuyerLabel
}
name=
"member"
>
<
RoleSelect
disabled=
{
true
}
formatFeils=
{
(
e
)
=>
{
return
{
buyerMemberId
:
e
.
memberId
,
buyerRoleId
:
e
.
roleId
,
roleType
:
2
,
name
:
e
.
name
}
}
}
/>
</
FormItem
>
<
FormItem
label=
{
NoteLabel
}
name=
"remark"
>
<
Input
/>
</
FormItem
>
</
ContentBox
>
<
ContentBox
title=
{
Harvest
.
name
}
id=
{
Harvest
.
key
}
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
ConsigneeTimeLabel
}
name=
"sendTime"
>
<
DatePickerSelect
className=
"w-full"
/>
</
FormItem
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
ReceivingAddress
}
name=
"receiveVO"
>
<
ReceiverAddress
/>
</
FormItem
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
DeliveryPhoneLabel
}
name=
"receiverBO.phone"
>
<
Input
/>
</
FormItem
>
</
ContentBox
>
<
ContentBox
title=
{
DeliveryInfo
.
name
}
id=
{
DeliveryInfo
.
key
}
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
DeliveryNoLabel
}
name=
"deliveryNo"
>
<
Input
disabled=
{
true
}
/>
</
FormItem
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
DeliveryDateLabel
}
name=
"deliveryTime"
>
<
DatePickerSelect
disabled=
{
true
}
className=
'w-full'
/>
</
FormItem
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
DeliveryNameLabel
}
name=
"deliveryVO"
>
<
ShipperAddress
disabled=
{
true
}
/>
</
FormItem
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
DeliveryTimeLabel
}
name=
"deliveryRangeTime"
>
<
DatePickerSelect
.
RangePicker
disabled=
{
true
}
className=
"w-full"
/>
</
FormItem
>
</
ContentBox
>
<
ContentBox
title=
{
LogisticsInfo
.
name
}
id=
{
LogisticsInfo
.
key
}
>
<
FormItem
hidden
name=
"deliveryType"
>
<
Input
/>
</
FormItem
>
<
FormItem
label=
{
DeliveryTypeLabel
}
>
<
RenaderDeliveryType
/>
</
FormItem
>
<
FormItem
label=
{
LogisticsCarNoLabel
}
name=
"executorVO.carNumbers"
>
<
Input
disabled=
{
true
}
/>
</
FormItem
>
<
FormItem
label=
{
LogisticsCompanyLabel
}
name=
"logisticsCompanyInt"
>
<
LogisticsCompanyMerchantsSelect
disabled=
{
true
}
/>
</
FormItem
>
<
FormItem
label=
{
LogisticsNoLabel
}
rules=
{
[
{
max
:
20
}
]
}
name=
"logisticsNo"
>
<
Input
maxLength=
{
20
}
disabled=
{
true
}
/>
</
FormItem
>
</
ContentBox
>
<
ContentBox
title=
{
HarvestMaterial
.
name
}
id=
{
HarvestMaterial
.
key
}
cols=
{
1
}
>
<
HarvestMaterialContextProvider
value=
{
{
dataSource
:
tableDataSource
}
}
>
<
Table
rowKey=
{
row
=>
row
.
orderNo
}
columns=
{
[
...
DeliveryNoticeTableColumn
,
{
...
DeliveryNumColumn
,
render
:
(
t
,
rcode
,
index
)
=>
{
return
(
<
HarvestMaterialInput
value=
{
rcode
[
OrderNumColumn
.
key
]
}
index=
{
index
}
keyUp=
"deliveryCount"
/>
)
}
}
]
}
dataSource=
{
tableDataSource
}
/>
</
HarvestMaterialContextProvider
>
</
ContentBox
>
<
ContentBox
className=
'mt-15'
title=
{
ExternalRoamRecord
.
name
}
id=
{
ExternalRoamRecord
.
key
}
cols=
{
1
}
>
<
Table
columns=
{
[
...
ExternalRoamRecordTableColumn
,
]
}
rowKey=
"id"
dataSource=
{
outerHistoryList
}
/>
</
ContentBox
>
</
Form
>
</
AnchorPage
>
)
}
export
default
DeliveryNoteAddForm
\ No newline at end of file
src/pages/order/receivingNote/deliveryNoteQuery/details.tsx
View file @
0e988912
...
...
@@ -70,11 +70,11 @@ const DeliveryNoteDetails: React.FC = () => {
</
ListInfoItem
>
<
ListInfoItem
label=
'送货人'
>
{
info
?.
delive
rVO
?.
consignee
}
{
info
?.
executo
rVO
?.
consignee
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货电话'
>
{
info
?.
delive
rVO
?.
phone
}
{
info
?.
executo
rVO
?.
phone
}
</
ListInfoItem
>
</
ListInfo
>
...
...
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