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
fcb40f71
Commit
fcb40f71
authored
Apr 01, 2022
by
rex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接 新增 srm。 获取详情信息
parent
4a4c2905
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
395 additions
and
122 deletions
+395
-122
deliveryNotice.ts
config/routes/orderRoute/deliveryNotice.ts
+8
-0
RoleSelect.tsx
src/components/RoleSelect/RoleSelect.tsx
+36
-13
columns.tsx
src/components/RoleSelect/columns.tsx
+17
-6
DeliveryNoteService.ts
src/pages/order/assets/handles/DeliveryNoteService.ts
+2
-2
DeliveryNoticeOrder.ts
src/pages/order/assets/handles/DeliveryNoticeOrder.ts
+1
-1
ReceiveNotePage.tsx
src/pages/order/assets/handles/ReceiveNotePage.tsx
+34
-0
useDetailInfoById.tsx
src/pages/order/assets/hooks/useDetailInfoById.tsx
+17
-0
DeliveryGoodTableSelectMock.ts
src/pages/order/assets/mock/DeliveryGoodTableSelectMock.ts
+0
-0
add.tsx
src/pages/order/deliveryNotice/manageSRM/add.tsx
+19
-0
details.tsx
src/pages/order/deliveryNotice/manageSRM/details.tsx
+2
-4
edit.tsx
src/pages/order/deliveryNotice/manageSRM/edit.tsx
+206
-0
index.tsx
src/pages/order/deliveryNotice/manageSRM/index.tsx
+3
-2
index.tsx
src/pages/order/receivingNote/deliveryNoteManage/index.tsx
+31
-53
index.tsx
src/pages/order/receivingNote/deliveryNoteQuery/index.tsx
+19
-41
No files found.
config/routes/orderRoute/deliveryNotice.ts
View file @
fcb40f71
...
@@ -29,6 +29,14 @@ const DeliveryNotice = [
...
@@ -29,6 +29,14 @@ const DeliveryNotice = [
hideInMenu
:
true
,
hideInMenu
:
true
,
noMargin
:
true
noMargin
:
true
},
},
{
/** 送货单编辑SRM*/
path
:
'/memberCenter/order/deliveryNotice/manageSRM/edit'
,
name
:
'送货单编辑(SRM)'
,
component
:
'@/pages/order/deliveryNotice/manageSRM/edit'
,
hideInMenu
:
true
,
noMargin
:
true
},
{
{
...
...
src/components/RoleSelect/RoleSelect.tsx
View file @
fcb40f71
import
{
Button
,
Col
,
Drawer
,
Form
,
Input
,
Row
,
Table
}
from
"antd"
;
import
{
Button
,
Col
,
Drawer
,
Form
,
Input
,
R
adio
,
R
ow
,
Table
}
from
"antd"
;
import
{
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
{
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
{
TableMemberColumn
}
from
"./columns"
;
import
{
TableMemberColumn
}
from
"./columns"
;
import
{
getMemberManageLowerProviderMerchantPage
}
from
'@/services/MemberV2Api'
;
import
{
///member/manage/lower/consumer/member/page
getMemberManageLowerProviderMerchantPage
,
getMemberManageUpperProviderMerchantPage
,
getMemberManageLowerConsumerMemberPage
}
from
'@/services/MemberV2Api'
;
interface
RoleSelectProps
{
interface
RoleSelectProps
{
request
?:
(
payload
:
any
)
=>
Promise
<
any
>
request
?:
(
payload
:
any
)
=>
Promise
<
any
>
onChange
?:
(
e
)
=>
void
}
}
/**
/**
...
@@ -15,9 +20,12 @@ interface RoleSelectProps {
...
@@ -15,9 +20,12 @@ interface RoleSelectProps {
*/
*/
function
RoleSelect
(
props
:
RoleSelectProps
)
{
function
RoleSelect
(
props
:
RoleSelectProps
)
{
const
{
onChange
}
=
props
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
form
]
=
Form
.
useForm
()
const
[
form
]
=
Form
.
useForm
()
const
[
dataSource
,
setDataSource
]
=
useState
([])
const
[
dataSource
,
setDataSource
]
=
useState
([])
const
[
intV
,
setIntV
]
=
useState
<
any
>
();
const
showDrawer
=
useCallback
(()
=>
{
const
showDrawer
=
useCallback
(()
=>
{
setVisible
(
true
)
setVisible
(
true
)
...
@@ -27,8 +35,10 @@ function RoleSelect(props: RoleSelectProps) {
...
@@ -27,8 +35,10 @@ function RoleSelect(props: RoleSelectProps) {
setVisible
(
false
)
setVisible
(
false
)
},
[
visible
])
},
[
visible
])
useEffect
(()
=>
{
useEffect
(()
=>
{
getMemberManageLowerProviderMerchantPage
(
form
.
getFieldsValue
()).
then
(
res
=>
{
getMemberManageLowerConsumerMemberPage
(
form
.
getFieldsValue
()).
then
(
res
=>
{
setDataSource
(
res
.
data
.
data
)
setDataSource
(
res
.
data
.
data
)
})
})
...
@@ -37,11 +47,11 @@ function RoleSelect(props: RoleSelectProps) {
...
@@ -37,11 +47,11 @@ function RoleSelect(props: RoleSelectProps) {
return
(
return
(
<>
<>
<
Row
gutter=
{
4
}
>
<
Row
gutter=
{
4
}
>
<
Col
span=
{
20
}
>
<
Col
span=
{
18
}
>
<
Input
/>
<
Input
value=
{
intV
?.
name
}
/>
</
Col
>
</
Col
>
<
Col
span=
{
4
}
>
<
Col
span=
{
6
}
>
<
Button
onClick=
{
showDrawer
}
>
选择会员
</
Button
>
<
Button
onClick=
{
showDrawer
}
>
选择
采购
会员
</
Button
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
...
@@ -52,7 +62,7 @@ function RoleSelect(props: RoleSelectProps) {
...
@@ -52,7 +62,7 @@ function RoleSelect(props: RoleSelectProps) {
width=
"50vw"
width=
"50vw"
footer=
{
footer=
{
<
Button
.
Group
>
<
Button
.
Group
>
<
Button
type=
"primary"
>
<
Button
type=
"primary"
onClick=
{
closeDrawer
}
>
确定
确定
</
Button
>
</
Button
>
</
Button
.
Group
>
</
Button
.
Group
>
...
@@ -63,10 +73,23 @@ function RoleSelect(props: RoleSelectProps) {
...
@@ -63,10 +73,23 @@ function RoleSelect(props: RoleSelectProps) {
<
Input
.
Search
/>
<
Input
.
Search
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
>
</
Form
>
<
Table
<
Radio
.
Group
className=
"block w-full"
onChange=
{
(
e
)
=>
{
columns=
{
TableMemberColumn
}
const
value
=
e
.
target
.
value
dataSource=
{
dataSource
}
let
target
=
{
/>
buyerMemberId
:
value
.
memberId
,
buyerRoleId
:
value
.
roleId
,
roleType
:
2
}
setIntV
(
target
)
onChange
(
target
)
}
}
>
<
Table
className=
"w-full"
columns=
{
TableMemberColumn
}
dataSource=
{
dataSource
}
/>
</
Radio
.
Group
>
</
Drawer
>
</
Drawer
>
</>
</>
);
);
...
...
src/components/RoleSelect/columns.ts
→
src/components/RoleSelect/columns.ts
x
View file @
fcb40f71
import
{
Radio
}
from
"antd"
;
export
const
TableMemberColumn
=
[
export
const
TableMemberColumn
=
[
{
{
title
:
''
,
render
:
(
t
,
r
)
=>
{
return
(
<
Radio
value=
{
r
}
/>
)
}
},
{
title
:
'序号'
,
title
:
'序号'
,
dataIndex
:
'id'
dataIndex
:
'id'
},
},
{
{
title
:
'会员ID'
,
title
:
'会员ID'
,
dataIndex
:
'memberId'
dataIndex
:
'memberId'
},
},
{
{
title
:
'会员名称'
,
title
:
'会员名称'
,
dataIndex
:
'name'
dataIndex
:
'name'
},
},
{
{
title
:
'会员类型'
,
title
:
'会员类型'
,
dataIndex
:
'memberTypeName'
dataIndex
:
'memberTypeName'
},
},
{
{
title
:
'会员角色'
,
title
:
'会员角色'
,
dataIndex
:
'roleName'
dataIndex
:
'roleName'
},
},
{
{
title
:
'会员等级'
,
title
:
'会员等级'
,
dataIndex
:
'levelTag'
dataIndex
:
'levelTag'
}
}
];
];
\ No newline at end of file
src/pages/order/assets/handles/DeliveryNoteService.ts
View file @
fcb40f71
...
@@ -47,4 +47,5 @@ export default class NoteFactoryService {
...
@@ -47,4 +47,5 @@ export default class NoteFactoryService {
static
getInstance
()
{
static
getInstance
()
{
return
new
NoteService
()
return
new
NoteService
()
}
}
}
}
\ No newline at end of file
src/pages/order/assets/handles/DeliveryNoticeOrder.ts
View file @
fcb40f71
...
@@ -23,7 +23,7 @@ class DeliveryNoticeOrder {
...
@@ -23,7 +23,7 @@ class DeliveryNoticeOrder {
// startDate: '2022-03-22',
// startDate: '2022-03-22',
// endDate: '2022-03-24'
// endDate: '2022-03-24'
}
}
// return Promise.resolve(
DeliveryGoodTableSelectMock
);
// return Promise.resolve(
{data:DeliveryGoodTableSelectMock}
);
return
getOrderDeliveryPlanOrderProductPage
(
payload
).
then
(
res
=>
{
return
getOrderDeliveryPlanOrderProductPage
(
payload
).
then
(
res
=>
{
return
res
.
data
;
return
res
.
data
;
})
})
...
...
src/pages/order/assets/handles/ReceiveNotePage.tsx
0 → 100644
View file @
fcb40f71
import
{
getOrderReceiveOrderDeliveryPage
}
from
'@/services/OrderNewV2Api'
;
// 收货单送货单管理
class
ReceiveNoteManage
{
getQuery
(
payload
?:
any
)
{
return
getOrderReceiveOrderDeliveryPage
().
then
(
res
=>
{
return
res
.
data
;
})
}
}
class
ReceiveNoteQuery
{
getQuery
(
payload
?:
any
)
{
return
getOrderReceiveOrderDeliveryPage
().
then
(
res
=>
{
return
res
.
data
;
})
}
}
export
default
class
ReceiveNoteFacotry
{
static
getInstance
(
type
:
'Manage'
|
'Query'
=
'Manage'
)
{
switch
(
type
)
{
case
'Manage'
:
return
new
ReceiveNoteManage
();
default
:
return
new
ReceiveNoteQuery
();
}
}
}
\ No newline at end of file
src/pages/order/assets/hooks/useDetailInfoById.tsx
0 → 100644
View file @
fcb40f71
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
NoteFactoryService
from
'../handles/DeliveryNoteService'
;
export
function
useDetailInfoById
(
id
)
{
const
[
info
,
setInfo
]
=
useState
<
any
>
();
const
service
=
NoteFactoryService
.
getInstance
();
useEffect
(()
=>
{
service
.
getDetailInfoById
(
id
).
then
(
res
=>
{
setInfo
(
res
as
any
)
})
},
[])
return
[
info
];
}
src/pages/order/assets/mock/DeliveryGoodTableSelectMock.ts
View file @
fcb40f71
This diff is collapsed.
Click to expand it.
src/pages/order/deliveryNotice/manageSRM/add.tsx
View file @
fcb40f71
...
@@ -21,6 +21,7 @@ import { DeliveryNoteAddService } from '../../assets/handles/HandleFormSubmit';
...
@@ -21,6 +21,7 @@ import { DeliveryNoteAddService } from '../../assets/handles/HandleFormSubmit';
import
{
RoleSelect
}
from
'@/components/RoleSelect'
;
import
{
RoleSelect
}
from
'@/components/RoleSelect'
;
import
DeliveryNoticeOrderFactory
from
'../../assets/handles/DeliveryNoticeOrder'
;
import
DeliveryNoticeOrderFactory
from
'../../assets/handles/DeliveryNoticeOrder'
;
import
LogisticsCompanyMerchantsSelect
from
'@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect'
;
import
LogisticsCompanyMerchantsSelect
from
'@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect'
;
import
{
values
}
from
'lodash'
;
const
ContentBoxItem
=
ContentBox
.
BaseInfoItem
;
const
ContentBoxItem
=
ContentBox
.
BaseInfoItem
;
...
@@ -169,6 +170,24 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
...
@@ -169,6 +170,24 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<
DeliveryGoodTableSelect
<
DeliveryGoodTableSelect
form=
{
form
}
form=
{
form
}
onChange=
{
(
value
)
=>
{
onChange=
{
(
value
)
=>
{
if
(
value
.
length
>
0
)
{
let
addr
=
{
provinceName
:
value
[
0
].
provinceName
,
cityName
:
value
[
0
].
cityName
,
districtName
:
value
[
0
].
districtName
,
streetName
:
value
[
0
].
streetName
,
address
:
value
[
0
].
address
,
phone
:
value
[
0
].
phone
,
consignee
:
value
[
0
].
consignee
,
receiverName
:
value
[
0
].
consignee
,
fullAddress
:
`${value[0].provinceName}${value[0].cityName}${value[0].districtName}${value[0].streetName}${value[0].address}`
}
form
.
setFieldsValue
({
'receiveVO'
:
addr
})
}
setTableDataSource
(
value
)
setTableDataSource
(
value
)
}
}
}
}
/>
/>
...
...
src/pages/order/deliveryNotice/manageSRM/details.tsx
View file @
fcb40f71
...
@@ -12,6 +12,7 @@ import { DeliveryNoticeTableColumn, ExternalRoamRecordTableColumn } from '../../
...
@@ -12,6 +12,7 @@ import { DeliveryNoticeTableColumn, ExternalRoamRecordTableColumn } from '../../
import
NoteFactoryService
from
'../../assets/handles/DeliveryNoteService'
;
import
NoteFactoryService
from
'../../assets/handles/DeliveryNoteService'
;
import
{
useLocation
}
from
'umi'
;
import
{
useLocation
}
from
'umi'
;
import
qs
from
'query-string'
;
import
qs
from
'query-string'
;
import
{
useDetailInfoById
}
from
'../../assets/hooks/useDetailInfoById'
;
const
ContentBoxItem
=
ContentBox
.
BaseInfoItem
;
const
ContentBoxItem
=
ContentBox
.
BaseInfoItem
;
...
@@ -31,15 +32,12 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
...
@@ -31,15 +32,12 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
ExternalRoamRecord
ExternalRoamRecord
])
])
const
[
info
,
setInfo
]
=
useState
<
any
>
()
const
[
info
]
=
useDetailInfoById
(
query
.
id
);
const
[
tableDataSource
,
setTableDataSource
]
=
useState
([]);
const
[
tableDataSource
,
setTableDataSource
]
=
useState
([]);
const
[
totalCount
,
setTotalCount
]
=
useState
(
1
);
const
[
totalCount
,
setTotalCount
]
=
useState
(
1
);
const
[
outerHistoryList
,
setOuterHistoryList
]
=
useState
([]);
const
[
outerHistoryList
,
setOuterHistoryList
]
=
useState
([]);
useEffect
(()
=>
{
useEffect
(()
=>
{
service
.
getDetailInfoById
(
query
.
id
as
string
).
then
(
res
=>
{
setInfo
(
res
)
})
service
.
getDetailInfoProductById
(
query
.
id
as
string
).
then
(
res
=>
{
service
.
getDetailInfoProductById
(
query
.
id
as
string
).
then
(
res
=>
{
setTableDataSource
(
res
.
data
)
setTableDataSource
(
res
.
data
)
...
...
src/pages/order/deliveryNotice/manageSRM/edit.tsx
0 → 100644
View file @
fcb40f71
/**
* 订单能力 - 送货单 - 送货单管理详情SRM
* @author: Gavin
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import
AnchorPage
,
{
AnchorsItem
}
from
'@/components/AnchorPage'
import
React
,
{
useCallback
,
useEffect
,
useState
,
useContext
}
from
'react'
import
{
BillsInfo
,
BuyerLabel
,
ConsigneeLabel
,
ConsigneePhoneLabel
,
ConsigneeTimeLabel
,
DeliveryAbstractLabel
,
DeliveryAddrLabel
,
DeliveryDateLabel
,
DeliveryGood
,
DeliveryInfo
,
DeliveryNameLabel
,
DeliveryNoLabel
,
DeliveryPhoneLabel
,
DeliverySlefAddrLabel
,
DeliveryTimeLabel
,
DeliveryTypeLabel
,
Distribution
,
LogisticsCarNoLabel
,
LogisticsCompanyLabel
,
LogisticsInfo
,
LogisticsNoLabel
,
NoteLabel
,
OutStatusLabel
,
ReceivingAddress
}
from
'../../constants'
import
{
BaseInfo
as
ContentBox
}
from
'@/components/BaseInfo'
import
{
Input
,
Table
,
Row
,
Col
,
Select
,
Radio
,
Form
,
Button
}
from
'antd'
;
import
{
DeliveryNoticeTableColumn
}
from
'../../constants/page-table-column'
;
import
{
FormItem
}
from
'@/components/FormItem'
;
import
{
DatePickerSelect
}
from
'@/components/DatePickerSelect'
import
{
AddressDrawer
}
from
'@/components/AddressDrawer'
;
import
{
getLogisticsSelectListReceiverAddress
,
getLogisticsSelectListShipperAddress
,
postLogisticsReceiverAddressAdd
,
postLogisticsReceiverAddressUpdate
,
postLogisticsShipperAddressAdd
,
postLogisticsShipperAddressUpdate
}
from
'@/services/LogisticsV2Api'
;
import
DeliveryGoodTableSelect
from
'../../components/DeliveryGoodTableSelect/DeliveryGoodTableSelect'
;
import
{
HarvestMaterialContextProvider
,
HarvestMaterialContext
}
from
'../../assets/context'
;
import
moment
from
'moment'
;
import
{
HandelFormFieldsKeyValue
}
from
'@/utils/form'
;
import
{
DeliveryNoteAddService
}
from
'../../assets/handles/HandleFormSubmit'
;
import
{
RoleSelect
}
from
'@/components/RoleSelect'
;
import
DeliveryNoticeOrderFactory
from
'../../assets/handles/DeliveryNoticeOrder'
;
import
LogisticsCompanyMerchantsSelect
from
'@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect'
;
import
{
useLocation
}
from
'umi'
;
import
{
useDetailInfoById
}
from
'../../assets/hooks/useDetailInfoById'
;
const
ContentBoxItem
=
ContentBox
.
BaseInfoItem
;
const
DeliveryNoticeManageSRMEdit
:
React
.
FC
=
()
=>
{
const
[
tableDataSource
,
setTableDataSource
]
=
useState
();
const
location
:
any
=
useLocation
()
const
{
id
}
=
location
.
query
const
[
info
]
=
useDetailInfoById
(
id
);
const
[
form
]
=
Form
.
useForm
()
const
service
=
new
DeliveryNoteAddService
(
form
);
const
[
anchors
,
setAnchors
]
=
useState
<
AnchorsItem
[]
>
([
BillsInfo
,
Distribution
,
DeliveryInfo
,
LogisticsInfo
,
DeliveryGood
,
])
useEffect
(()
=>
{
form
.
setFieldsValue
({
sourceType
:
0
})
console
.
log
(
info
)
form
.
setFieldsValue
(
info
)
},
[
info
])
const
handleSubmit
=
useCallback
(()
=>
{
service
.
setTableData
(
tableDataSource
);
service
.
submit
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
go
(
-
1
)
}
});
},
[
form
,
tableDataSource
])
return
(
<
AnchorPage
title=
"送货单管理详情(SRM)"
anchors=
{
anchors
}
extra=
{
<
Button
.
Group
>
<
Button
onClick=
{
handleSubmit
}
type=
'primary'
>
提交
</
Button
>
</
Button
.
Group
>
}
>
<
Form
form=
{
form
}
>
<
FormItem
name=
"sourceType"
>
<
Input
type=
"hidden"
/>
</
FormItem
>
<
ContentBox
title=
{
BillsInfo
.
name
}
id=
{
BillsInfo
.
key
}
>
<
FormItem
label=
{
DeliveryAbstractLabel
}
name=
"digest"
>
<
Input
/>
</
FormItem
>
<
FormItem
label=
{
NoteLabel
}
name=
"remark"
>
<
Input
/>
</
FormItem
>
<
FormItem
label=
{
BuyerLabel
}
name=
"member"
>
<
RoleSelect
/>
</
FormItem
>
</
ContentBox
>
<
ContentBox
title=
{
Distribution
.
name
}
id=
{
Distribution
.
key
}
>
<
FormItem
label=
{
DeliveryDateLabel
}
name=
"deliveryTime"
>
<
DatePickerSelect
className=
'w-full'
/>
</
FormItem
>
<
FormItem
label=
{
DeliveryNameLabel
}
name=
"deliveryVO"
>
<
AddressDrawer
addressListRequest=
{
(
val
)
=>
{
return
getLogisticsSelectListReceiverAddress
(
val
)
}
}
sumbitRequest=
{
{
update
:
(
val
)
=>
{
return
postLogisticsReceiverAddressUpdate
(
val
)
},
add
:
(
val
)
=>
{
return
postLogisticsReceiverAddressAdd
(
val
)
}
}
}
/>
</
FormItem
>
<
FormItem
label=
{
DeliveryTimeLabel
}
name=
"deliveryRangeTime"
>
<
DatePickerSelect
.
RangePicker
className=
"w-full"
picker=
'time'
/>
</
FormItem
>
<
FormItem
label=
{
DeliveryPhoneLabel
}
name=
"executorVO.phone"
>
<
Input
/>
</
FormItem
>
</
ContentBox
>
<
ContentBox
title=
{
DeliveryInfo
.
name
}
id=
{
DeliveryInfo
.
key
}
>
<
FormItem
label=
{
ConsigneeTimeLabel
}
name=
"sendTime"
>
<
DatePickerSelect
className=
"w-full"
/>
</
FormItem
>
<
FormItem
label=
{
ReceivingAddress
}
name=
"receiveVO"
>
<
AddressDrawer
addressListRequest=
{
(
val
)
=>
{
return
getLogisticsSelectListShipperAddress
(
val
)
}
}
sumbitRequest=
{
{
update
:
(
val
)
=>
{
return
postLogisticsShipperAddressUpdate
(
val
)
},
add
:
(
val
)
=>
{
return
postLogisticsShipperAddressAdd
(
val
)
}
}
}
/>
</
FormItem
>
</
ContentBox
>
<
ContentBox
title=
{
LogisticsInfo
.
name
}
id=
{
LogisticsInfo
.
key
}
>
<
FormItem
label=
{
DeliveryTypeLabel
}
name=
"deliveryType"
>
<
Radio
.
Group
>
<
Radio
.
Button
value=
{
1
}
>
物流
</
Radio
.
Button
>
<
Radio
.
Button
value=
{
2
}
>
自提
</
Radio
.
Button
>
{
/* <Radio.Button value={3}>无效配送</Radio.Button> */
}
</
Radio
.
Group
>
</
FormItem
>
<
FormItem
label=
{
LogisticsCarNoLabel
}
name=
"executorVO.carNumbers"
>
<
Input
/>
</
FormItem
>
<
FormItem
label=
{
LogisticsCompanyLabel
}
name=
"logisticsCompanyInt"
rules=
{
[
{
required
:
true
}
]
}
>
<
LogisticsCompanyMerchantsSelect
/>
</
FormItem
>
<
FormItem
label=
{
LogisticsNoLabel
}
name=
"logisticsNo"
>
<
Input
/>
</
FormItem
>
</
ContentBox
>
<
ContentBox
title=
{
DeliveryGood
.
name
}
id=
{
DeliveryGood
.
key
}
cols=
{
1
}
>
<
DeliveryGoodTableSelect
form=
{
form
}
onChange=
{
(
value
)
=>
{
console
.
log
(
value
)
setTableDataSource
(
value
)
}
}
/>
<
HarvestMaterialContextProvider
value=
{
{
dataSource
:
tableDataSource
}
}
>
<
Table
rowKey=
{
row
=>
row
.
orderNo
}
columns=
{
DeliveryNoticeTableColumn
}
dataSource=
{
tableDataSource
}
/>
</
HarvestMaterialContextProvider
>
</
ContentBox
>
</
Form
>
</
AnchorPage
>
)
}
export
default
DeliveryNoticeManageSRMEdit
\ No newline at end of file
src/pages/order/deliveryNotice/manageSRM/index.tsx
View file @
fcb40f71
...
@@ -19,13 +19,14 @@ import { deliveryNoticeManageSRMSchema } from './schema'
...
@@ -19,13 +19,14 @@ import { deliveryNoticeManageSRMSchema } from './schema'
import
NoteFactoryService
from
'../../assets/handles/DeliveryNoteService'
import
NoteFactoryService
from
'../../assets/handles/DeliveryNoteService'
import
dayjs
from
'dayjs'
import
dayjs
from
'dayjs'
import
{
TagStatus
,
TagStatusFactory
}
from
'../../utils'
import
{
TagStatus
,
TagStatusFactory
}
from
'../../utils'
import
{
Link
}
from
'umi'
import
{
Link
,
useHistory
}
from
'umi'
const
DeliveryNoticeManageSRM
:
React
.
FC
=
()
=>
{
const
DeliveryNoticeManageSRM
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
ref
=
useRef
<
any
>
({})
const
formActions
=
createFormActions
()
const
formActions
=
createFormActions
()
const
service
=
NoteFactoryService
.
getInstance
();
const
service
=
NoteFactoryService
.
getInstance
();
const
tagStatus
=
TagStatusFactory
.
getInstance
();
const
tagStatus
=
TagStatusFactory
.
getInstance
();
const
history
=
useHistory
()
const
statusTxt
=
new
Map
([[
1
,
'已提交'
],
[
2
,
'已收货'
],
[
3
,
'已作废'
]]);
const
statusTxt
=
new
Map
([[
1
,
'已提交'
],
[
2
,
'已收货'
],
[
3
,
'已作废'
]]);
...
@@ -50,7 +51,7 @@ const DeliveryNoticeManageSRM: React.FC = () => {
...
@@ -50,7 +51,7 @@ const DeliveryNoticeManageSRM: React.FC = () => {
'查看'
:
true
,
'查看'
:
true
,
}
}
const
operationHandler
=
{
const
operationHandler
=
{
'修改'
:
()
=>
{
console
.
log
(
'修改 :>> '
,
)
},
'修改'
:
()
=>
{
history
.
push
(
`/memberCenter/order/deliveryNotice/manageSRM/edit?id=
${
record
.
id
}
`
)
},
'作废'
:
()
=>
{
console
.
log
(
'作废 :>> '
,)
},
'作废'
:
()
=>
{
console
.
log
(
'作废 :>> '
,)
},
'查看'
:
()
=>
{
console
.
log
(
'查看 :>> '
,)
},
'查看'
:
()
=>
{
console
.
log
(
'查看 :>> '
,)
},
}
}
...
...
src/pages/order/receivingNote/deliveryNoteManage/index.tsx
View file @
fcb40f71
...
@@ -3,38 +3,29 @@
...
@@ -3,38 +3,29 @@
* @author: Gavin
* @author: Gavin
* @description:
* @description:
*/
*/
import
React
,
{
useRef
,
useState
}
from
'react'
import
React
,
{
useRef
,
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
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'
import
EyePreview
from
'@/components/EyePreview'
import
EyePreview
from
'@/components/EyePreview'
import
NiceForm
from
'@/components/NiceForm'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
}
from
'@formily/antd'
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
deliveryNoteManageSchema
}
from
'./schema'
import
{
deliveryNoteManageSchema
}
from
'./schema'
import
ReceiveNoteFacotry
from
'../../assets/handles/ReceiveNotePage'
import
{
TagStatusFactory
}
from
'../../utils'
const
tagStatusColor
=
{
const
tagService
=
TagStatusFactory
.
getInstance
()
// 待提交
2
:
{
color
:
'#f4f5f7'
,
fontColor
:
'#5c626a'
},
// 待确认
3
:
{
color
:
'#ecf2fe'
,
fontColor
:
'#4787f0'
},
// 待修订
4
:
{
color
:
'#eae6ff'
,
fontColor
:
'#9963d8'
},
// 已确认
5
:
{
color
:
'#ebf9f6'
,
fontColor
:
'#00a98f'
},
// 已生产送货单
6
:
{
color
:
'#f0f5ff'
,
fontColor
:
'#f0f5ff'
},
// 已作废
7
:
{
color
:
'#fff2f0'
,
fontColor
:
'#ff4d4f'
},
}
const
DeliveryNoteManage
:
React
.
FC
=
()
=>
{
const
DeliveryNoteManage
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
ref
=
useRef
<
any
>
({})
const
formActions
=
createFormActions
()
const
formActions
=
createFormActions
()
const
service
=
ReceiveNoteFacotry
.
getInstance
();
const
controllerBtns
=
(<
Space
></
Space
>)
const
controllerBtns
=
(<
Space
></
Space
>)
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
const
btnAuthOfOperationTextMap
=
{
...
@@ -68,21 +59,23 @@ const DeliveryNoteManage: React.FC = () => {
...
@@ -68,21 +59,23 @@ const DeliveryNoteManage: React.FC = () => {
width
:
160
,
width
:
160
,
render
:
(
text
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/receivingNote/deliveryNoteManage/details'
>
{
text
}
</
EyePreview
>
render
:
(
text
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/receivingNote/deliveryNoteManage/details'
>
{
text
}
</
EyePreview
>
},
},
{
title
:
'收货单摘要'
,
dataIndex
:
'id2'
,
key
:
'id2'
},
{
title
:
'收货单摘要'
,
dataIndex
:
'digest'
,
key
:
'digest'
},
{
title
:
'收货日期'
,
dataIndex
:
'id3'
,
key
:
'id3'
},
{
title
:
'送货单号'
,
dataIndex
:
'deliveryNo'
,
key
:
'deliveryNo'
},
{
title
:
'送货单号'
,
dataIndex
:
'id3'
,
key
:
'id3'
},
{
title
:
'送货日期'
,
dataIndex
:
'deliveryTime'
,
key
:
'deliveryTime'
},
{
title
:
'送货日期'
,
dataIndex
:
'id3'
,
key
:
'id3'
},
{
title
:
'采购会员'
,
dataIndex
:
'buyerMemberName'
,
key
:
'buyerMemberName'
},
{
title
:
'采购会员'
,
dataIndex
:
'id5'
,
key
:
'id5'
},
{
title
:
'单据时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
},
{
title
:
'单据时间'
,
dataIndex
:
'id4'
,
key
:
'id4'
},
{
{
title
:
'外部状态'
,
title
:
'外部状态'
,
dataIndex
:
'id6'
,
dataIndex
:
'id6'
,
key
:
'id6'
,
key
:
'id6'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
render
:
(
text
:
string
,
record
:
any
)
=>
{
<
Tag
color=
{
tagStatusColor
[
record
.
id
]?.
color
}
>
const
styles
=
tagService
.
getTagStyle
(
record
.
outerStatus
);
<
span
style=
{
{
color
:
tagStatusColor
[
record
.
id
]?.
fontColor
}
}
>
{
text
}
</
span
>
return
(
</
Tag
>
<
Tag
color=
{
styles
.
bgColor
}
>
)
<
span
style=
{
{
color
:
styles
.
fontColor
}
}
>
{
text
}
</
span
>
</
Tag
>
)
}
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
...
@@ -94,22 +87,7 @@ const DeliveryNoteManage: React.FC = () => {
...
@@ -94,22 +87,7 @@ const DeliveryNoteManage: React.FC = () => {
]
]
const
fetchData
=
(
params
:
unknown
)
=>
{
const
fetchData
=
(
params
:
unknown
)
=>
{
console
.
log
(
'params :>> '
,
params
);
return
service
.
getQuery
(
params
);
return
new
Promise
((
resolve
)
=>
{
const
data
=
{
totalCount
:
1
,
data
:
[
{
id
:
1
,
id2
:
2
,
id3
:
3
,
id4
:
4
,
id5
:
5
,
id6
:
6
},
{
id
:
2
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
3
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
4
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
5
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
6
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
7
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
8
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
]
}
resolve
(
data
)
})
}
}
return
(
return
(
...
...
src/pages/order/receivingNote/deliveryNoteQuery/index.tsx
View file @
fcb40f71
...
@@ -15,6 +15,8 @@ import { createFormActions } from '@formily/antd'
...
@@ -15,6 +15,8 @@ import { createFormActions } from '@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
deliveryNoteQuerySchema
}
from
'./schema'
import
{
deliveryNoteQuerySchema
}
from
'./schema'
import
ReceiveNoteFacotry
from
'../../assets/handles/ReceiveNotePage'
import
{
TagStatusFactory
}
from
'../../utils'
...
@@ -30,25 +32,13 @@ enum StatusEnum {
...
@@ -30,25 +32,13 @@ enum StatusEnum {
}
}
const
tagStatusColor
:
IStatusEnum
=
{
// 待提交
[
StatusEnum
.
ToSbumit
]:
{
color
:
'#f4f5f7'
,
fontColor
:
'#5c626a'
},
// 待确认
3
:
{
color
:
'#ecf2fe'
,
fontColor
:
'#4787f0'
},
// 待修订
4
:
{
color
:
'#eae6ff'
,
fontColor
:
'#9963d8'
},
// 已确认
5
:
{
color
:
'#ebf9f6'
,
fontColor
:
'#00a98f'
},
// 已生产送货单
6
:
{
color
:
'#f0f5ff'
,
fontColor
:
'#f0f5ff'
},
// 已作废
7
:
{
color
:
'#fff2f0'
,
fontColor
:
'#ff4d4f'
},
}
const
DeliveryNoteQuery
:
React
.
FC
=
()
=>
{
const
DeliveryNoteQuery
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
ref
=
useRef
<
any
>
({})
const
formActions
=
createFormActions
()
const
formActions
=
createFormActions
()
const
service
=
ReceiveNoteFacotry
.
getInstance
(
'Query'
)
const
tagStatus
=
TagStatusFactory
.
getInstance
();
const
controllerBtns
=
(<
Space
></
Space
>)
const
controllerBtns
=
(<
Space
></
Space
>)
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
const
btnAuthOfOperationTextMap
=
{
...
@@ -79,20 +69,23 @@ const DeliveryNoteQuery: React.FC = () => {
...
@@ -79,20 +69,23 @@ const DeliveryNoteQuery: React.FC = () => {
width
:
160
,
width
:
160
,
render
:
(
text
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/receivingNote/deliveryNoteQuery/details'
>
{
text
}
</
EyePreview
>
render
:
(
text
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/receivingNote/deliveryNoteQuery/details'
>
{
text
}
</
EyePreview
>
},
},
{
title
:
'收货单摘要'
,
dataIndex
:
'
id2'
,
key
:
'id2
'
},
{
title
:
'收货单摘要'
,
dataIndex
:
'
digest'
,
key
:
'digest
'
},
{
title
:
'收货日期'
,
dataIndex
:
'
id3'
,
key
:
'id3
'
},
{
title
:
'收货日期'
,
dataIndex
:
'
receiveTime'
,
key
:
'receiveTime
'
},
{
title
:
'送货日期'
,
dataIndex
:
'
id3'
,
key
:
'id3
'
},
{
title
:
'送货日期'
,
dataIndex
:
'
deliveryTime'
,
key
:
'deliveryTime
'
},
{
title
:
'采购会员'
,
dataIndex
:
'
id5'
,
key
:
'id5
'
},
{
title
:
'采购会员'
,
dataIndex
:
'
buyerMemberName'
,
key
:
'buyerMemberName
'
},
{
title
:
'单据时间'
,
dataIndex
:
'
id4'
,
key
:
'id4
'
},
{
title
:
'单据时间'
,
dataIndex
:
'
createTime'
,
key
:
'createTime
'
},
{
{
title
:
'外部状态'
,
title
:
'外部状态'
,
dataIndex
:
'id6'
,
dataIndex
:
'id6'
,
key
:
'id6'
,
key
:
'id6'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
render
:
(
text
:
string
,
record
:
any
)
=>
{
<
Tag
color=
{
tagStatusColor
[
record
.
id
]?.
color
}
>
const
styles
=
tagStatus
.
getTagStyle
(
record
.
outerStatus
)
<
span
style=
{
{
color
:
tagStatusColor
[
record
.
id
]?.
fontColor
}
}
>
{
text
}
</
span
>
return
(
</
Tag
>
<
Tag
color=
{
styles
.
bgColor
}
>
)
<
span
style=
{
{
color
:
styles
.
fontColor
}
}
>
{
record
.
outerStatus
}
</
span
>
</
Tag
>
)
}
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
...
@@ -104,22 +97,7 @@ const DeliveryNoteQuery: React.FC = () => {
...
@@ -104,22 +97,7 @@ const DeliveryNoteQuery: React.FC = () => {
]
]
const
fetchData
=
(
params
:
unknown
)
=>
{
const
fetchData
=
(
params
:
unknown
)
=>
{
console
.
log
(
'params :>> '
,
params
);
return
service
.
getQuery
(
params
).
then
(
res
=>
res
.
data
)
return
new
Promise
((
resolve
)
=>
{
const
data
=
{
totalCount
:
1
,
data
:
[
{
id
:
1
,
id2
:
2
,
id3
:
3
,
id4
:
4
,
id5
:
5
,
id6
:
6
},
{
id
:
2
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
3
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
4
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
5
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
6
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
7
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
{
id
:
8
,
id2
:
3
,
id3
:
4
,
id4
:
5
,
id5
:
6
,
id6
:
7
},
]
}
resolve
(
data
)
})
}
}
return
(
return
(
...
...
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