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
0b242de3
Commit
0b242de3
authored
Apr 08, 2022
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2-220418' into fix-0418-order
parents
d8422d79
5ce1c294
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
1170 additions
and
346 deletions
+1170
-346
deliveryNoticeManagement.ts
config/routes/orderRoute/deliveryNoticeManagement.ts
+17
-1
AddressDrawer.tsx
src/components/AddressDrawer/AddressDrawer.tsx
+3
-3
DeliveryGoodTableSelect.tsx
...nents/DeliveryGoodTableSelect/DeliveryGoodTableSelect.tsx
+1
-1
page-table-column.tsx
src/pages/order/constants/page-table-column.tsx
+10
-10
index.ts
src/pages/order/deliveryNoticeManagement/constant/index.ts
+70
-0
add.tsx
...r/deliveryNoticeManagement/deliveryNoticeAwaitB2B/add.tsx
+14
-0
index.tsx
...eliveryNoticeAwaitB2B/components/AddEditContent/index.tsx
+186
-0
edit.tsx
.../deliveryNoticeManagement/deliveryNoticeAwaitB2B/edit.tsx
+20
-0
index.tsx
...deliveryNoticeManagement/deliveryNoticeAwaitB2B/index.tsx
+37
-44
index.tsx
...yNoticeManagement/deliveryNoticeAwaitB2B/schema/index.tsx
+5
-5
add.tsx
...r/deliveryNoticeManagement/deliveryNoticeAwaitSRM/add.tsx
+15
-0
index.tsx
...eliveryNoticeAwaitSRM/components/AddEditContent/index.tsx
+264
-0
details.tsx
...liveryNoticeManagement/deliveryNoticeAwaitSRM/details.tsx
+77
-121
edit.tsx
.../deliveryNoticeManagement/deliveryNoticeAwaitSRM/edit.tsx
+21
-0
index.tsx
...deliveryNoticeManagement/deliveryNoticeAwaitSRM/index.tsx
+53
-44
index.tsx
...yNoticeManagement/deliveryNoticeAwaitSRM/schema/index.tsx
+5
-5
index.tsx
...ment/deliveryNoticeQuery/components/ToVoidModal/index.tsx
+86
-0
details.tsx
.../deliveryNoticeManagement/deliveryNoticeQuery/details.tsx
+48
-37
index.tsx
...er/deliveryNoticeManagement/deliveryNoticeQuery/index.tsx
+48
-49
index.tsx
...veryNoticeManagement/deliveryNoticeQuery/schema/index.tsx
+5
-5
index.ts
...ion/purchaseRequisition/increaseRequisition/apis/index.ts
+1
-0
index.tsx
...creaseRequisition/components/materialModalTable/index.tsx
+26
-10
useGetTableSearchData.tsx
...n/components/materialModalTable/useGetTableSearchData.tsx
+38
-0
index.less
...action/purchaseRequisition/increaseRequisition/index.less
+15
-0
index.tsx
...saction/purchaseRequisition/increaseRequisition/index.tsx
+84
-11
index.ts
...n/purchaseRequisition/increaseRequisition/schema/index.ts
+10
-0
modal.ts
...n/purchaseRequisition/increaseRequisition/schema/modal.ts
+11
-0
No files found.
config/routes/orderRoute/deliveryNoticeManagement.ts
View file @
0b242de3
...
...
@@ -29,13 +29,29 @@ const DeliveryNoticeManagement = [
component
:
'@/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM'
},
{
/**
增修查
送货通知单SRM详情*/
/**
查看
送货通知单SRM详情*/
path
:
'/memberCenter/order/deliveryNoticeManagement/awaitSRM/details'
,
name
:
'增修查送货通知单SRM详情'
,
component
:
'@/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/details'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
/** 新增送货通知单SRM*/
path
:
'/memberCenter/order/deliveryNoticeManagement/awaitSRM/add'
,
name
:
'新增送货通知单SRM'
,
component
:
'@/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/add'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
/** 修改送货通知单SRM*/
path
:
'/memberCenter/order/deliveryNoticeManagement/awaitSRM/edit'
,
name
:
'修改送货通知单SRM'
,
component
:
'@/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/edit'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
/** 待提交送货通知单B2B*/
...
...
src/components/AddressDrawer/AddressDrawer.tsx
View file @
0b242de3
...
...
@@ -25,12 +25,12 @@ interface AddressDrawerProps {
addressListRequest
?:
(
values
?:
any
)
=>
Promise
<
any
>
value
?:
any
disabled
?:
boolean
rows
?:
number
}
function
AddressDrawer
(
props
:
AddressDrawerProps
)
{
const
{
onChange
,
formInstance
,
renderForm
,
sumbitRequest
,
addressListRequest
,
value
:
addr
,
disabled
=
false
}
=
props
;
const
{
onChange
,
formInstance
,
renderForm
,
sumbitRequest
,
addressListRequest
,
value
:
addr
,
disabled
=
false
,
rows
=
2
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
showForm
,
setShowForm
]
=
useState
<
boolean
>
(
false
);
...
...
@@ -90,7 +90,7 @@ function AddressDrawer(props: AddressDrawerProps) {
<
AddressRaioContextProvider
value=
{
addrList
}
>
<
Row
gutter=
{
10
}
>
<
Col
span=
{
20
}
>
<
Input
.
TextArea
disabled=
{
disabled
}
value=
{
`${value?.fullAddress??''} ${value?.shipperName ? value?.shipperName : value?.receiverName ?? ''} ${value?.phone??''}`
}
/>
<
Input
.
TextArea
rows=
{
rows
}
disabled=
{
disabled
}
value=
{
`${value?.fullAddress??''} ${value?.shipperName ? value?.shipperName : value?.receiverName ?? ''} ${value?.phone??''}`
}
/>
</
Col
>
<
Col
span=
{
4
}
>
...
...
src/pages/order/components/DeliveryGoodTableSelect/DeliveryGoodTableSelect.tsx
View file @
0b242de3
...
...
@@ -79,7 +79,7 @@ function DeliveryGoodTableModal(props: DeliveryGoodTableModalProps) {
return
(
<>
<
div
className=
'mt-16'
>
<
Button
onClick=
{
handleVisible
}
>
选择物
流
</
Button
>
<
Button
onClick=
{
handleVisible
}
>
选择物
料
</
Button
>
</
div
>
<
Drawer
...
...
src/pages/order/constants/page-table-column.tsx
View file @
0b242de3
...
...
@@ -88,16 +88,16 @@ export const ExternalRoamRecordTableColumn: any = [
// 送货物料
export
const
DeliveryMaterialsTableColumn
:
any
=
[
{
dataIndex
:
'name1'
,
...
MaterialNoColumn
,
},
{
dataIndex
:
'name2'
,
...
MaterialNameColumn
,
},
{
dataIndex
:
'name3'
,
...
MaterialModelColumn
,
},
{
dataIndex
:
'name4'
,
...
ClassColumn
,
},
{
dataIndex
:
'name5'
,
...
BrandColumn
,
},
{
dataIndex
:
'name6'
,
...
UntilColumn
,
},
{
dataIndex
:
'name7'
,
...
OrderNoColumn
,
},
{
dataIndex
:
'name8'
,
...
OrderCreatedAtColumn
,
},
{
dataIndex
:
'name9'
,
...
OredrNumColumn
,
},
{
dataIndex
:
'name10'
,
...
PlannedDeliveryNumColumn
,
},
{
...
MaterialNoColumn
,
dataIndex
:
'skuId'
},
{
...
MaterialNameColumn
,
dataIndex
:
'productName'
},
{
...
MaterialModelColumn
,
dataIndex
:
'type'
},
{
...
ClassColumn
,
dataIndex
:
'category'
},
{
...
BrandColumn
,
dataIndex
:
'brand'
},
{
...
UntilColumn
,
dataIndex
:
'unit'
},
{
...
OrderNoColumn
,
dataIndex
:
'orderNo'
},
{
...
OrderCreatedAtColumn
,
dataIndex
:
'createTime'
},
{
...
OredrNumColumn
,
dataIndex
:
'purchaseCount'
},
{
...
PlannedDeliveryNumColumn
,
dataIndex
:
'planCount'
},
]
// 送货商品
...
...
src/pages/order/deliveryNoticeManagement/constant/index.ts
0 → 100644
View file @
0b242de3
import
{
getIntl
}
from
'umi'
;
const
intl
=
getIntl
();
/**
* 通知单订单类型
*/
export
enum
ORDER_TYPE
{
B2B
=
1
,
SRM
=
2
,
}
/**
* WAIT_CONFIRM 待确认
*
* WAIT_REVISE 待修订
*
* HAD_CONFIRM 已确认
*
* HAD_GENERATE 已生产送货单
*
* HAD_TO_VOID 已作废
*/
export
enum
STATUS
{
WAIT_CONFIRM
=
1
,
WAIT_REVISE
=
2
,
HAD_CONFIRM
=
3
,
HAD_GENERATE
=
4
,
HAD_TO_VOID
=
5
,
}
/**
* 状态相关颜色码
*/
export
const
STATUS_NAME
=
{
// 待确认
[
STATUS
.
WAIT_CONFIRM
]:
'待确认'
,
// 待修订
[
STATUS
.
WAIT_REVISE
]:
'待修订'
,
// 已确认
[
STATUS
.
HAD_CONFIRM
]:
'已确认'
,
// 已生产送货单
[
STATUS
.
HAD_GENERATE
]:
'已生产送货单'
,
// 已作废
[
STATUS
.
HAD_TO_VOID
]:
'已作废'
,
}
/**
* 状态相关颜色码
*/
export
const
TAG_STATUS_COLOR
=
{
// 待确认
[
STATUS
.
WAIT_CONFIRM
]:
{
color
:
'#ecf2fe'
,
fontColor
:
'#4787f0'
},
// 待修订
[
STATUS
.
WAIT_REVISE
]:
{
color
:
'#eae6ff'
,
fontColor
:
'#9963d8'
},
// 已确认
[
STATUS
.
HAD_CONFIRM
]:
{
color
:
'#ebf9f6'
,
fontColor
:
'#00a98f'
},
// 已生产送货单
[
STATUS
.
HAD_GENERATE
]:
{
color
:
'#f0f5ff'
,
fontColor
:
'#f0f5ff'
},
// 已作废
[
STATUS
.
HAD_TO_VOID
]:
{
color
:
'#fff2f0'
,
fontColor
:
'#ff4d4f'
},
}
/**
* 外部状态
*/
export
enum
OUTER_STATUS
{
WAIT_SUBMIT
=
1
,
HAD_CONFIRM
=
2
,
}
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/add.tsx
0 → 100644
View file @
0b242de3
/**
* 订单能力 - 送货通知单管理 - 新增待提交送货通知单B2B
* @author: Gavin
*/
import
React
,
{
useRef
}
from
'react'
import
AddEditContent
from
'./components/AddEditContent'
const
DeliveryNoticeManagementAwaitB2BAdd
:
React
.
FC
=
()
=>
{
return
(
<
AddEditContent
type=
'add'
/>
)
}
export
default
DeliveryNoticeManagementAwaitB2BAdd
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/components/AddEditContent/index.tsx
0 → 100644
View file @
0b242de3
/**
* 订单能力 - 待提交送货通知单SRM - 增修送货通知单B2B详情
* @author: Gavin
*/
import
React
,
{
useState
}
from
'react'
import
AnchorPage
,
{
AnchorsItem
}
from
'@/components/AnchorPage'
import
{
history
}
from
'umi'
import
{
BaseInfo
as
base_info
,
DeliveryList
,
Remarks
,
ExternalRoamRecord
,
Circulation
,
Purchaser
,
SubmitDeliveryNotice
,
Supplier
,
ConfirmDeliveryNotice
,
NoticeSummary
,
BuyerLabel
,
DeliveryDate
,
ReceivingAddress
,
ShippingInfo
,
}
from
'../../../../constants'
import
BaseInfo
from
'@/components/BaseInfo/BaseInfo'
import
{
Button
,
DatePicker
,
Form
,
Input
,
Steps
,
Table
,
TimePicker
}
from
'antd'
import
{
PlusOutlined
}
from
'@ant-design/icons'
import
{
AddressDrawer
}
from
'@/components/AddressDrawer'
import
{
BrandColumn
,
ClassColumn
,
FlowOptionsColumn
,
MaterialModelColumn
,
MaterialNameColumn
,
MaterialNoColumn
,
OrderCreatedAtColumn
,
OrderNoColumn
,
OredrNumColumn
,
PlannedDeliveryNumColumn
,
UntilColumn
}
from
'../../../../constants/table-column'
import
{
ExternalRoamRecordTableColumn
}
from
'../../../../constants/page-table-column'
import
{
getLogisticsSelectListReceiverAddress
,
postLogisticsReceiverAddressAdd
,
postLogisticsReceiverAddressUpdate
}
from
'@/services/LogisticsV2Api'
type
PropsType
=
{
type
:
'add'
|
'edit'
;
id
?:
string
;
}
enum
PAGE_TYPE
{
ADD
=
'add'
,
EDIT
=
'edit'
}
const
PAGE_TYPE_LABEL
=
{
[
PAGE_TYPE
.
ADD
]:
'新增'
,
[
PAGE_TYPE
.
EDIT
]:
'编辑'
,
}
const
formItemLayout
=
{
labelCol
:
{
span
:
3
},
wrapperCol
:
{
span
:
18
}
}
const
aa
=
[
{
id
:
'1'
,
'name1'
:
'1'
,
'name2'
:
'2'
,
'name3'
:
'3'
,
'name4'
:
'4'
,
'name5'
:
'5'
,
'name6'
:
'6'
,
'name7'
:
'7'
,
'name8'
:
'8'
,
'name9'
:
'6'
,
},
]
const
DeliveryNoticeManagementAwaitB2BDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
})
=>
{
const
[
iAnchors
,
setiAnchors
]
=
useState
<
AnchorsItem
[]
>
([
Circulation
,
base_info
,
ShippingInfo
,
DeliveryList
,
Remarks
,
])
const
[
details
,
setDetails
]
=
useState
<
any
>
({})
return
(
<
AnchorPage
title=
{
`${PAGE_TYPE_LABEL[type]}送货通知单(SRM)`
}
onBack=
{
()
=>
history
.
goBack
()
}
anchors=
{
iAnchors
}
>
<
Form
labelAlign=
'left'
>
<
BaseInfo
className=
'mt-0'
title=
{
Circulation
.
name
}
id=
{
Circulation
.
key
}
cols=
{
1
}
>
<
Steps
progressDot
current=
{
0
}
>
<
Steps
.
Step
title=
{
Purchaser
}
description=
{
SubmitDeliveryNotice
}
/>
<
Steps
.
Step
title=
{
Supplier
}
description=
{
ConfirmDeliveryNotice
}
/>
</
Steps
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
base_info
.
name
}
id=
{
base_info
.
key
}
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
NoticeSummary
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
BuyerLabel
}
>
<
Input
/>
</
Form
.
Item
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
ShippingInfo
.
name
}
id=
{
ShippingInfo
.
key
}
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
DeliveryDate
}
>
<
DatePicker
style=
{
{
width
:
'100%'
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
ReceivingAddress
}
name=
'test'
>
<
AddressDrawer
addressListRequest=
{
(
val
)
=>
{
return
getLogisticsSelectListReceiverAddress
(
val
)
}
}
sumbitRequest=
{
{
update
:
(
val
)
=>
{
return
postLogisticsReceiverAddressUpdate
(
val
)
},
add
:
(
val
)
=>
{
return
postLogisticsReceiverAddressAdd
(
val
)
}
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
DeliveryDate
}
>
<
TimePicker
.
RangePicker
format=
{
'HH:mm'
}
style=
{
{
width
:
'100%'
}
}
/>
</
Form
.
Item
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
DeliveryList
.
name
}
id=
{
DeliveryList
.
key
}
cols=
{
1
}
>
<
Button
icon=
{
<
PlusOutlined
/>
}
>
选择
</
Button
>
{
/* SRM 物料列表*/
}
<
Table
rowKey=
{
'id'
}
dataSource=
{
aa
}
columns=
{
[
{
dataIndex
:
'name1'
,
...
MaterialNoColumn
,
},
{
dataIndex
:
'name2'
,
...
MaterialNameColumn
,
},
{
dataIndex
:
'name3'
,
...
MaterialModelColumn
,
},
{
dataIndex
:
'name4'
,
...
ClassColumn
,
},
{
dataIndex
:
'name5'
,
...
BrandColumn
,
},
{
dataIndex
:
'name6'
,
...
UntilColumn
,
},
{
dataIndex
:
'name7'
,
...
OrderNoColumn
,
},
{
dataIndex
:
'name8'
,
...
OrderCreatedAtColumn
,
},
{
dataIndex
:
'name9'
,
...
OredrNumColumn
,
},
{
dataIndex
:
'name10'
,
...
PlannedDeliveryNumColumn
,
render
:
(
_
,
rcode
,
index
)
=>
{
return
(<
Input
/>)
},
editable
:
true
,
},
{
key
:
'action'
,
...
FlowOptionsColumn
,
render
:
()
=>
(<
Button
type=
'link'
>
删除
</
Button
>)
}
]
}
/>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
Remarks
.
name
}
id=
{
Remarks
.
key
}
cols=
{
1
}
>
<
Form
.
Item
// { ...formItemLayout }
labelCol=
{
{
span
:
0
}
}
wrapperCol=
{
{
span
:
24
}
}
>
<
Input
.
TextArea
rows=
{
6
}
maxLength=
{
300
}
placeholder=
'最长600个字符,300个汉字。'
/>
</
Form
.
Item
>
</
BaseInfo
>
</
Form
>
</
AnchorPage
>
)
}
export
default
DeliveryNoticeManagementAwaitB2BDetails
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/edit.tsx
0 → 100644
View file @
0b242de3
/**
* 订单能力 - 送货通知单管理 - 修改待提交送货通知单B2B
* @author: Gavin
*/
import
React
,
{
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
AddEditContent
from
'./components/AddEditContent'
const
DeliveryNoticeManagementAwaitB2BEdit
:
React
.
FC
=
()
=>
{
const
id
=
history
.
location
?.
query
?.
id
return
(
<
AddEditContent
type=
'edit'
id=
{
id
as
string
}
/>
)
}
export
default
DeliveryNoticeManagementAwaitB2BEdit
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/index.tsx
View file @
0b242de3
...
...
@@ -3,7 +3,7 @@
* @author: Gavin
* @description: 与SRM内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import
React
,
{
useRef
,
useState
}
from
'react'
import
React
,
{
useRef
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Button
,
Card
,
Space
,
Tag
}
from
'antd'
import
StandardTable
from
'@/components/StandardTable'
...
...
@@ -11,31 +11,28 @@
import
TableOperation
from
'@/components/TableOperation'
import
EyePreview
from
'@/components/EyePreview'
import
NiceForm
from
'@/components/NiceForm'
import
AuthButton
from
'@/components/AuthButton'
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
deliveryNoticeManagementB2BSchema
}
from
'./schema'
const
tagStatusColor
=
{
// 待提交
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'
},
}
import
{
getOrderDeliveryNoticeOrderVendorPage
}
from
'@/services/OrderNewV2Api'
import
{
ORDER_TYPE
,
TAG_STATUS_COLOR
,
OUTER_STATUS
,
STATUS_NAME
}
from
'../constant'
import
{
history
}
from
'umi'
import
{
PlusOutlined
}
from
'@ant-design/icons'
const
DeliveryNoticeManagementAwaitB2B
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
formActions
=
createFormActions
()
const
controllerBtns
=
(<
Space
></
Space
>)
const
controllerBtns
=
(
<
Space
>
<
AuthButton
btnCode=
''
menuCode=
''
>
<
Button
type=
'primary'
icon=
{
<
PlusOutlined
/>
}
>
新增
</
Button
>
</
AuthButton
>
</
Space
>
)
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'修改'
:
'DevTest'
,
...
...
@@ -47,7 +44,7 @@ const DeliveryNoticeManagementAwaitB2B: React.FC = () => {
}
const
operationHandler
=
{
'修改'
:
()
=>
{
console
.
log
(
'修改 :>> '
,)
},
'查看'
:
()
=>
{
console
.
log
(
'查看 :>> '
,
)
},
'查看'
:
()
=>
{
history
.
push
(
`/memberCenter/order/deliveryNoticeManagement/awaitB2B/details?id=
${
record
.
id
}
`
)
},
}
return
(
<
TableOperation
...
...
@@ -57,26 +54,27 @@ const DeliveryNoticeManagementAwaitB2B: React.FC = () => {
/>
)
}
const
columns
:
ColumnType
<
unknown
>
[]
=
[
{
title
:
'通知单号'
,
dataIndex
:
'
id
'
,
key
:
'
id
'
,
dataIndex
:
'
noticeNo
'
,
key
:
'
noticeNo
'
,
width
:
160
,
ellipsis
:
true
,
render
:
(
text
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/deliveryNoticeManagement/awaitB2B/details'
>
{
text
}
</
EyePreview
>
render
:
(
text
:
unknown
,
record
:
any
)
=>
<
EyePreview
url=
{
`/memberCenter/order/deliveryNoticeManagement/awaitB2B/details?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'通知单摘要'
,
dataIndex
:
'
id2'
,
key
:
'id2
'
},
{
title
:
'送货日期'
,
dataIndex
:
'
id3'
,
key
:
'id3
'
},
{
title
:
'采购会员'
,
dataIndex
:
'
id5'
,
key
:
'id5
'
},
{
title
:
'单据时间'
,
dataIndex
:
'
id4'
,
key
:
'id4
'
},
{
title
:
'通知单摘要'
,
dataIndex
:
'
digest'
,
key
:
'digest
'
},
{
title
:
'送货日期'
,
dataIndex
:
'
deliveryTime'
,
key
:
'deliveryTime
'
},
{
title
:
'采购会员'
,
dataIndex
:
'
memberName'
,
key
:
'memberName
'
},
{
title
:
'单据时间'
,
dataIndex
:
'
createTime'
,
key
:
'createTime
'
},
{
title
:
'外部状态'
,
dataIndex
:
'
id6
'
,
key
:
'
id6
'
,
dataIndex
:
'
status
'
,
key
:
'
status
'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
<
Tag
color=
{
tagStatusColor
[
record
.
id3
]?.
color
}
>
<
span
style=
{
{
color
:
tagStatusColor
[
record
.
id3
]?.
fontColor
}
}
>
{
text
}
</
span
>
<
Tag
color=
{
TAG_STATUS_COLOR
[
text
]?.
color
}
>
<
span
style=
{
{
color
:
TAG_STATUS_COLOR
[
text
]?.
fontColor
}
}
>
{
STATUS_NAME
[
text
]
}
</
span
>
</
Tag
>
)
},
...
...
@@ -89,22 +87,17 @@ const DeliveryNoticeManagementAwaitB2B: React.FC = () => {
},
]
const
fetchData
=
(
params
:
unknown
)
=>
{
console
.
log
(
'params :>> '
,
params
);
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
)
=>
{
const
data
=
{
totalCount
:
1
,
data
:
[
{
id
:
1
,
id2
:
2
,
id3
:
4
,
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
},
]
}
getOrderDeliveryNoticeOrderVendorPage
({
...
params
,
orderType
:
ORDER_TYPE
.
B2B
,
status
:
OUTER_STATUS
.
WAIT_SUBMIT
}).
then
(({
code
,
data
})
=>
{
if
(
code
===
1000
)
{
resolve
(
data
)
}
})
})
}
...
...
@@ -128,7 +121,7 @@ const DeliveryNoticeManagementAwaitB2B: React.FC = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
planCode
'
,
'
noticeNo
'
,
FORM_FILTER_PATH
,
)
}
}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/schema/index.tsx
View file @
0b242de3
...
...
@@ -26,7 +26,7 @@ export const deliveryNoticeManagementB2BSchema: ISchema = {
children
:
'{{controllerBtns}}'
,
},
},
planCode
:
{
noticeNo
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
...
...
@@ -48,25 +48,25 @@ export const deliveryNoticeManagementB2BSchema: ISchema = {
},
},
properties
:
{
abstrac
t
:
{
diges
t
:
{
type
:
'string'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'通知单摘要'
}
},
'[start
Time, endTim
e]'
:
{
'[start
Date, endDat
e]'
:
{
type
:
'daterange'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
[
'送货开始日期'
,
'送货结束日期'
],
},
},
supplyMember
:
{
memberName
:
{
type
:
'string'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'
供应
会员'
placeholder
:
'
采购
会员'
}
},
submit
:
{
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/add.tsx
0 → 100644
View file @
0b242de3
/**
* 订单能力 - 送货通知单管理 - 新增待提交送货通知单SRM
* @author: Gavin
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import
React
,
{
useRef
}
from
'react'
import
AddEditContent
from
'./components/AddEditContent'
const
DeliveryNoticeManagementAwaitSRMAdd
:
React
.
FC
=
()
=>
{
return
(
<
AddEditContent
type=
'add'
/>
)
}
export
default
DeliveryNoticeManagementAwaitSRMAdd
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/components/AddEditContent/index.tsx
0 → 100644
View file @
0b242de3
/**
* 订单能力 - 待提交送货通知单SRM - 增修送货通知单SRM详情
* @author: Gavin
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import
React
,
{
useState
}
from
'react'
import
AnchorPage
,
{
AnchorsItem
}
from
'@/components/AnchorPage'
import
{
history
}
from
'umi'
import
BaseInfo
from
'@/components/BaseInfo/BaseInfo'
import
{
Button
,
DatePicker
,
Form
,
Input
,
message
,
Steps
,
Table
,
TimePicker
}
from
'antd'
import
{
PlusOutlined
}
from
'@ant-design/icons'
import
{
AddressDrawer
}
from
'@/components/AddressDrawer'
import
AuthButton
from
'@/components/AuthButton'
import
{
RoleSelect
}
from
'@/components/RoleSelect'
import
DeliveryGoodTableSelect
from
'../../../../components/DeliveryGoodTableSelect/DeliveryGoodTableSelect'
;
import
{
HarvestMaterialContextProvider
,
HarvestMaterialInput
}
from
'../../../../assets/context'
;
import
{
getLogisticsSelectListReceiverAddress
}
from
'@/services/LogisticsV2Api'
import
{
postOrderDeliveryNoticeOrderSrmCreate
}
from
'@/services/OrderNewV2Api'
import
{
BaseInfo
as
base_info
,
DeliveryList
,
Remarks
,
ExternalRoamRecord
,
Circulation
,
Purchaser
,
SubmitDeliveryNotice
,
Supplier
,
ConfirmDeliveryNotice
,
NoticeSummary
,
BuyerLabel
,
DeliveryDate
,
DeliveryTime
,
ReceivingAddress
,
ShippingInfo
}
from
'../../../../constants'
import
{
BrandColumn
,
ClassColumn
,
FlowOptionsColumn
,
MaterialModelColumn
,
MaterialNameColumn
,
MaterialNoColumn
,
OrderCreatedAtColumn
,
OrderNoColumn
,
OredrNumColumn
,
PlannedDeliveryNumColumn
,
UntilColumn
}
from
'../../../../constants/table-column'
import
dayjs
from
'dayjs'
type
PropsType
=
{
type
:
'add'
|
'edit'
;
id
?:
string
;
}
enum
PAGE_TYPE
{
ADD
=
'add'
,
EDIT
=
'edit'
}
const
PAGE_TYPE_LABEL
=
{
[
PAGE_TYPE
.
ADD
]:
'新增'
,
[
PAGE_TYPE
.
EDIT
]:
'编辑'
,
}
const
formItemLayout
=
{
labelCol
:
{
span
:
4
},
wrapperCol
:
{
span
:
18
}
}
const
DeliveryNoticeManagementAwaitSRMDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
})
=>
{
const
[
form
]
=
Form
.
useForm
()
const
[
iAnchors
,
setiAnchors
]
=
useState
<
AnchorsItem
[]
>
([
Circulation
,
base_info
,
ShippingInfo
,
DeliveryList
,
Remarks
,
])
const
[
details
,
setDetails
]
=
useState
<
any
>
({})
const
[
tableDataSource
,
setTableDataSource
]
=
useState
<
any
[]
>
()
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
handleSubmit
=
()
=>
{
form
.
validateFields
().
then
(({
deliveryStartEndTime
,
deliveryTime
,
digest
,
member
,
receivingAddress
,
remark
})
=>
{
const
{
name
:
buyerMemberName
,
roleType
,
...
buyerMemberRest
}
=
member
const
params
=
{
...
buyerMemberRest
,
buyerMemberName
,
digest
,
...
receivingAddress
,
deliveryTime
:
dayjs
(
deliveryTime
).
format
(
'YYYY-MM-DD'
),
deliveryStartTime
:
dayjs
(
deliveryStartEndTime
[
0
]).
format
(
'hh:mm'
),
deliveryEndTime
:
dayjs
(
deliveryStartEndTime
[
1
]).
format
(
'hh:mm'
),
products
:
tableDataSource
,
remark
}
console
.
log
(
'params'
,
params
)
setLoading
(
true
)
postOrderDeliveryNoticeOrderSrmCreate
(
params
).
then
(({
code
,
data
})
=>
{
if
(
code
===
1000
)
{
message
.
success
(
'提交成功'
)
history
.
goBack
()
}
}).
finally
(()
=>
{
setLoading
(
false
)
})
})
}
const
handleRemoveMaterialTableRow
=
(
i
:
number
)
=>
{
const
source
:
any
[]
=
tableDataSource
;
const
newSource
=
source
.
splice
(
i
,
0
)
setTableDataSource
(
newSource
);
}
return
(
<
AnchorPage
title=
{
`${PAGE_TYPE_LABEL[type]}送货通知单(SRM)`
}
onBack=
{
()
=>
history
.
goBack
()
}
anchors=
{
iAnchors
}
extra=
{
<
AuthButton
btnCode=
''
menuCode=
''
>
<
Button
loading=
{
loading
}
onClick=
{
handleSubmit
}
type=
'primary'
>
提交
</
Button
>
</
AuthButton
>
}
>
<
Form
labelAlign=
'left'
form=
{
form
}
>
<
BaseInfo
className=
'mt-0'
title=
{
Circulation
.
name
}
id=
{
Circulation
.
key
}
cols=
{
1
}
>
<
Steps
progressDot
current=
{
0
}
>
<
Steps
.
Step
title=
{
Purchaser
}
description=
{
SubmitDeliveryNotice
}
/>
<
Steps
.
Step
title=
{
Supplier
}
description=
{
ConfirmDeliveryNotice
}
/>
</
Steps
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
base_info
.
name
}
id=
{
base_info
.
key
}
>
<
Form
.
Item
{
...
formItemLayout
}
name=
'digest'
label=
{
NoticeSummary
}
rules=
{
[
{
required
:
true
,
message
:
`请填写${NoticeSummary}`
}
]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
formItemLayout
}
rules=
{
[
{
required
:
true
,
message
:
`请选择${BuyerLabel}`
}
]
}
label=
{
BuyerLabel
}
name=
"member"
>
<
RoleSelect
formatFeils=
{
(
e
)
=>
{
return
{
buyerMemberId
:
e
.
memberId
,
buyerRoleId
:
e
.
roleId
,
roleType
:
2
,
name
:
e
.
name
}
}
}
/>
</
Form
.
Item
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
ShippingInfo
.
name
}
id=
{
ShippingInfo
.
key
}
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
DeliveryDate
}
name=
'deliveryTime'
rules=
{
[
{
required
:
true
,
message
:
`请选择${DeliveryDate}`
}
]
}
>
<
DatePicker
style=
{
{
width
:
'100%'
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
ReceivingAddress
}
name=
'receivingAddress'
rules=
{
[
{
required
:
true
,
message
:
`请选择${ReceivingAddress}`
}
]
}
>
<
AddressDrawer
disabled
rows=
{
1
}
addressListRequest=
{
(
val
)
=>
{
return
getLogisticsSelectListReceiverAddress
(
val
)
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
DeliveryTime
}
name=
'deliveryStartEndTime'
rules=
{
[
{
required
:
true
,
message
:
`请选择${DeliveryTime}`
}
]
}
>
<
TimePicker
.
RangePicker
format=
{
'HH:mm'
}
style=
{
{
width
:
'100%'
}
}
/>
</
Form
.
Item
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
DeliveryList
.
name
}
id=
{
DeliveryList
.
key
}
cols=
{
1
}
>
<
DeliveryGoodTableSelect
form=
{
form
}
onChange=
{
(
value
)
=>
{
if
(
value
.
length
>
0
)
{
let
addr
=
{
provinceName
:
value
[
0
].
provinceName
,
cityName
:
value
[
0
].
cityName
,
districtName
:
value
[
0
].
districtName
,
streetName
:
value
[
0
].
streetName
||
'0'
,
address
:
value
[
0
].
address
,
phone
:
value
[
0
].
phone
,
consignee
:
value
[
0
].
consignee
,
consigneeId
:
value
[
0
].
consigneeId
,
fullAddress
:
`${value[0].provinceName}${value[0].cityName}${value[0].districtName}${value[0].streetName}${value[0].address}`
}
form
.
setFieldsValue
({
'receivingAddress'
:
addr
})
}
setTableDataSource
(
value
)
}
}
/>
<
HarvestMaterialContextProvider
value=
{
{
dataSource
:
tableDataSource
}
}
>
<
Table
rowKey=
{
row
=>
row
.
orderNo
}
columns=
{
[
...[
{
...
MaterialNoColumn
,
dataIndex
:
'orderProductId'
},
{
...
MaterialNameColumn
,
dataIndex
:
'productName'
},
{
...
MaterialModelColumn
,
dataIndex
:
'spec'
},
{
...
ClassColumn
,
dataIndex
:
'category'
},
{
...
BrandColumn
,
dataIndex
:
'brand'
},
{
...
UntilColumn
,
dataIndex
:
'unit'
},
{
...
OrderNoColumn
,
dataIndex
:
'orderNo'
},
{
...
OrderCreatedAtColumn
,
dataIndex
:
'createTime'
},
{
...
OredrNumColumn
,
dataIndex
:
'purchaseCount'
},
],
{
title
:
'计划送货数量'
,
width
:
100
,
align
:
'center'
,
render
:
(
t
,
rcode
,
index
)
=>
{
return
(
<
HarvestMaterialInput
value=
{
rcode
[
OredrNumColumn
.
key
]
}
index=
{
index
}
keyUp=
"deliveryCount"
/>
)
}
},
{
title
:
"操作"
,
render
:
(
t
,
r
,
i
)
=>
{
return
(
<
Button
type=
'link'
onClick=
{
()
=>
handleRemoveMaterialTableRow
(
i
)
}
>
删除
</
Button
>
)
}
}
]
}
dataSource=
{
tableDataSource
}
/>
</
HarvestMaterialContextProvider
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
Remarks
.
name
}
id=
{
Remarks
.
key
}
cols=
{
1
}
>
<
Form
.
Item
labelCol=
{
{
span
:
0
}
}
wrapperCol=
{
{
span
:
24
}
}
name=
'remark'
>
<
Input
.
TextArea
rows=
{
6
}
maxLength=
{
300
}
placeholder=
'最长600个字符,300个汉字'
/>
</
Form
.
Item
>
</
BaseInfo
>
</
Form
>
</
AnchorPage
>
)
}
export
default
DeliveryNoticeManagementAwaitSRMDetails
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/details.tsx
View file @
0b242de3
/**
* 订单能力 -
待提交送货通知单SRM - 增修查送货通知单SRM
详情
* 订单能力 -
送货通知单管理 - 送货通知单
详情
* @author: Gavin
* @description:
与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
* @description:
*/
import
React
,
{
useState
}
from
'react'
import
AnchorPage
,
{
AnchorsItem
}
from
'@/components/AnchorPage'
import
{
history
}
from
'umi'
import
{
BaseInfo
as
base_info
,
DeliveryList
,
Remarks
,
ExternalRoamRecord
,
Circulation
,
Purchaser
,
SubmitDeliveryNotice
,
Supplier
,
ConfirmDeliveryNotice
,
NoticeSummary
,
BuyerLabel
,
DeliveryDate
,
ReceivingAddress
,
ShippingInfo
,
}
from
'../../constants'
import
BaseInfo
from
'@/components/BaseInfo/BaseInfo'
import
{
Button
,
DatePicker
,
Form
,
Input
,
Steps
,
Table
,
TimePicker
}
from
'antd
'
import
{
PlusOutlined
}
from
'@ant-design/icons
'
import
{
AddressDrawer
}
from
'@/components/AddressDrawer
'
import
{
BrandColumn
,
ClassColumn
,
FlowOptionsColumn
,
MaterialModelColumn
,
MaterialNameColumn
,
MaterialNoColumn
,
OrderCreatedAtColumn
,
OrderNoColumn
,
OredrNumColumn
,
PlannedDeliveryNumColumn
,
UntilColumn
}
from
'../../constants/table-column
'
import
{
ExternalRoamRecordTableColumn
}
from
'../../constants/page-table-column
'
import
React
,
{
useEffect
,
useState
}
from
'react'
import
AnchorPage
,
{
AnchorsItem
}
from
'@/components/AnchorPage'
import
{
history
,
useLocation
}
from
'umi'
import
{
Circulation
,
ConfirmDeliveryPlan
,
DeliveryNoticeDetaitlsAnchors
,
Purchaser
,
SubmitDeliveryPlan
,
Supplier
,
BaseInfo
as
base_Info
,
NoticeNo
,
BuyerLabel
,
NoticeSummary
,
ExternalState
,
ShippingInfo
,
DeliveryDate
,
DeliveryTime
,
ReceivingAddress
,
DeliveryList
,
ExternalRoamRecord
,
}
from
'../../constants'
import
BaseInfo
from
'@/components/BaseInfo/BaseInfo'
import
StandardTable
from
'@/components/StandardTable
'
import
{
Steps
,
Table
,
Tag
}
from
'antd
'
import
{
DeliveryMaterialsTableColumn
,
ExternalRoamRecordTableColumn
}
from
'../../constants/page-table-column
'
import
{
getOrderDeliveryNoticeOrderDetail
,
getOrderDeliveryNoticeOrderDetailPage
,
getOrderDeliveryNoticeOrderDeliveryHistory
}
from
'@/services/OrderNewV2Api
'
import
{
ORDER_TYPE
,
TAG_STATUS_COLOR
,
OUTER_STATUS
,
STATUS_NAME
}
from
'../constant
'
const
formItemLayout
=
{
labelCol
:
{
span
:
3
},
wrapperCol
:
{
span
:
18
}
}
const
DeliveryNoticeManagementAwaitSRMDetails
:
React
.
FC
=
()
=>
{
const
id
=
history
.
location
?.
query
?.
id
const
aa
=
[
{
id
:
'1'
,
'name1'
:
'1'
,
'name2'
:
'2'
,
'name3'
:
'3'
,
'name4'
:
'4'
,
'name5'
:
'5'
,
'name6'
:
'6'
,
'name7'
:
'7'
,
'name8'
:
'8'
,
'name9'
:
'6'
,
},
]
const
DeliveryNoticeManagementAwaitSRMDetails
:
React
.
FC
=
()
=>
{
const
[
iAnchors
,
setiAnchors
]
=
useState
<
AnchorsItem
[]
>
([
Circulation
,
base_info
,
ShippingInfo
,
DeliveryList
,
Remarks
,
ExternalRoamRecord
,
])
const
[
iAnchors
,
setiAnchors
]
=
useState
<
AnchorsItem
[]
>
(
DeliveryNoticeDetaitlsAnchors
)
const
[
details
,
setDetails
]
=
useState
<
any
>
({})
const
getDetail
=
async
()
=>
{
if
(
id
)
{
const
{
code
,
data
}
=
await
getOrderDeliveryNoticeOrderDetail
({
id
});
if
(
code
===
1000
)
{
setDetails
(
data
||
{})
}
}
}
const
fetchData
=
(
api
:
Function
,
params
:
any
)
=>
{
return
new
Promise
((
resolve
)
=>
{
api
({
...
params
,
orderId
:
id
}).
then
(({
code
,
data
})
=>
{
if
(
code
===
1000
)
{
resolve
(
data
)
}
})
})
}
useEffect
(()
=>
{
getDetail
()
},
[])
return
(
<
AnchorPage
title=
{
details
?.
name
||
'没有title'
}
title=
{
details
?.
noticeNo
}
onBack=
{
()
=>
history
.
goBack
()
}
anchors=
{
iAnchors
}
>
<
Form
labelAlign=
'left'
>
<
BaseInfo
className=
'mt-0'
title=
{
Circulation
.
name
}
id=
{
Circulation
.
key
}
cols=
{
1
}
>
<
Steps
progressDot
current=
{
0
}
>
<
Steps
.
Step
title=
{
Purchaser
}
description=
{
SubmitDeliveryNotice
}
/>
<
Steps
.
Step
title=
{
Supplier
}
description=
{
ConfirmDeliveryNotice
}
/>
<
Steps
progressDot
current=
{
details
.
outerStatus
-
1
}
>
<
Steps
.
Step
title=
{
Purchaser
}
description=
{
SubmitDeliveryPlan
}
/>
<
Steps
.
Step
title=
{
Supplier
}
description=
{
ConfirmDeliveryPlan
}
/>
</
Steps
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
base_info
.
name
}
id=
{
base_info
.
key
}
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
NoticeSummary
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
BuyerLabel
}
>
<
Input
/>
</
Form
.
Item
>
<
BaseInfo
className=
'mt-16'
title=
{
base_Info
.
name
}
id=
{
base_Info
.
key
}
>
<
BaseInfo
.
BaseInfoItem
label=
{
NoticeNo
}
>
{
details
.
noticeNo
}
</
BaseInfo
.
BaseInfoItem
>
<
BaseInfo
.
BaseInfoItem
label=
{
BuyerLabel
}
>
{
details
.
buyerMemberName
}
</
BaseInfo
.
BaseInfoItem
>
<
BaseInfo
.
BaseInfoItem
label=
{
NoticeSummary
}
>
{
details
.
digest
}
</
BaseInfo
.
BaseInfoItem
>
<
BaseInfo
.
BaseInfoItem
label=
{
ExternalState
}
>
<
Tag
color=
'green'
>
{
STATUS_NAME
[
details
.
status
]
}
</
Tag
>
</
BaseInfo
.
BaseInfoItem
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
ShippingInfo
.
name
}
id=
{
ShippingInfo
.
key
}
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
DeliveryDate
}
>
<
DatePicker
style=
{
{
width
:
'100%'
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
ReceivingAddress
}
name=
'test'
>
<
AddressDrawer
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
formItemLayout
}
label=
{
DeliveryDate
}
>
<
TimePicker
.
RangePicker
format=
{
'HH:mm'
}
style=
{
{
width
:
'100%'
}
}
/>
</
Form
.
Item
>
<
BaseInfo
.
BaseInfoItem
label=
{
DeliveryDate
}
>
{
details
.
deliveryTime
}
</
BaseInfo
.
BaseInfoItem
>
<
BaseInfo
.
BaseInfoItem
label=
{
ReceivingAddress
}
>
<
div
>
{
details
.
consignee
}
/
{
details
.
phone
}
</
div
>
<
div
>
{
details
.
provinceName
}{
details
.
cityName
}{
details
.
districtName
}{
details
.
streetName
}{
details
.
address
}
</
div
>
</
BaseInfo
.
BaseInfoItem
>
<
BaseInfo
.
BaseInfoItem
label=
{
DeliveryTime
}
>
{
details
.
deliveryStartTime
}
至
{
details
.
deliveryEndTime
}
</
BaseInfo
.
BaseInfoItem
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
DeliveryList
.
name
}
id=
{
DeliveryList
.
key
}
cols=
{
1
}
>
<
Button
icon=
{
<
PlusOutlined
/>
}
>
选择
</
Button
>
{
/* SRM 物料列表*/
}
<
Table
rowKey=
{
'id'
}
dataSource=
{
aa
}
columns=
{
[
{
dataIndex
:
'name1'
,
...
MaterialNoColumn
,
},
{
dataIndex
:
'name2'
,
...
MaterialNameColumn
,
},
{
dataIndex
:
'name3'
,
...
MaterialModelColumn
,
},
{
dataIndex
:
'name4'
,
...
ClassColumn
,
},
{
dataIndex
:
'name5'
,
...
BrandColumn
,
},
{
dataIndex
:
'name6'
,
...
UntilColumn
,
},
{
dataIndex
:
'name7'
,
...
OrderNoColumn
,
},
{
dataIndex
:
'name8'
,
...
OrderCreatedAtColumn
,
},
{
dataIndex
:
'name9'
,
...
OredrNumColumn
,
},
{
dataIndex
:
'name10'
,
...
PlannedDeliveryNumColumn
,
render
:
(
_
,
rcode
,
index
)
=>
{
return
(<
Input
/>)
},
editable
:
true
,
},
{
key
:
'action'
,
...
FlowOptionsColumn
,
render
:
()
=>
(<
Button
type=
'link'
>
删除
</
Button
>)
}
]
}
{
/* SRM 物料列表(DeliveryMaterialsTableColumn), B2B商品列表(DeliveryGoodsTableColumn) */
}
<
StandardTable
columns=
{
DeliveryMaterialsTableColumn
}
tableProps=
{
{
rowKey
:
'id'
,
}
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
getOrderDeliveryNoticeOrderDetailPage
,
{
...
params
,
orderId
:
id
})
}
controlRender=
{
<
div
></
div
>
}
/>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
Remarks
.
name
}
id=
{
Remarks
.
key
}
cols=
{
1
}
>
<
Form
.
Item
// { ...formItemLayout }
labelCol=
{
{
span
:
0
}
}
wrapperCol=
{
{
span
:
24
}
}
>
<
Input
.
TextArea
rows=
{
6
}
maxLength=
{
300
}
placeholder=
'最长600个字符,300个汉字。'
/>
</
Form
.
Item
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
ExternalRoamRecord
.
name
}
id=
{
ExternalRoamRecord
.
key
}
cols=
{
1
}
>
<
Table
rowKey=
{
'id'
}
dataSource=
{
[{
id
:
'1'
,
'name1'
:
'1'
,
'name2'
:
'操作角色'
,
'name3'
:
'状态'
,
'name4'
:
'操作'
,
'name5'
:
'操作时间'
,
'name6'
:
'备注'
,
},]
}
<
StandardTable
columns=
{
ExternalRoamRecordTableColumn
}
tableProps=
{
{
rowKey
:
'id'
,
}
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
getOrderDeliveryNoticeOrderDeliveryHistory
,
{
...
params
,
id
})
}
controlRender=
{
<
div
></
div
>
}
/>
</
BaseInfo
>
</
Form
>
</
AnchorPage
>
)
}
}
export
default
DeliveryNoticeManagementAwaitSRMDetails
\ No newline at end of file
export
default
DeliveryNoticeManagementAwaitSRMDetails
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/edit.tsx
0 → 100644
View file @
0b242de3
/**
* 订单能力 - 送货通知单管理 - 修改待提交送货通知单SRM
* @author: Gavin
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import
React
,
{
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
AddEditContent
from
'./components/AddEditContent'
const
DeliveryNoticeManagementAwaitSRMEdit
:
React
.
FC
=
()
=>
{
const
id
=
history
.
location
?.
query
?.
id
return
(
<
AddEditContent
type=
'edit'
id=
{
id
as
string
}
/>
)
}
export
default
DeliveryNoticeManagementAwaitSRMEdit
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/index.tsx
View file @
0b242de3
...
...
@@ -3,7 +3,7 @@
* @author: Gavin
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import
React
,
{
useRef
,
useState
}
from
'react'
import
React
,
{
useRef
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Button
,
Card
,
Space
,
Tag
}
from
'antd'
import
StandardTable
from
'@/components/StandardTable'
...
...
@@ -11,31 +11,44 @@
import
TableOperation
from
'@/components/TableOperation'
import
EyePreview
from
'@/components/EyePreview'
import
NiceForm
from
'@/components/NiceForm'
import
AuthButton
from
'@/components/AuthButton'
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
deliveryNoticeManagementSRMSchema
}
from
'./schema'
import
{
getOrderDeliveryNoticeOrderVendorPage
}
from
'@/services/OrderNewV2Api'
import
{
ORDER_TYPE
,
TAG_STATUS_COLOR
,
OUTER_STATUS
,
STATUS_NAME
,
STATUS
}
from
'../constant'
import
{
history
}
from
'umi'
import
{
PlusOutlined
}
from
'@ant-design/icons'
const
tagStatusColor
=
{
// 待提交
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
mock
=
{
totalCount
:
4
,
data
:
[
{
id
:
1
,
noticeNo
:
'2e12e'
,
status
:
STATUS
.
WAIT_CONFIRM
},
{
id
:
2
,
noticeNo
:
'axascac'
,
status
:
STATUS
.
WAIT_REVISE
},
{
id
:
3
,
noticeNo
:
'fafa'
,
status
:
STATUS
.
HAD_CONFIRM
},
{
id
:
4
,
noticeNo
:
'fasffqw'
,
status
:
STATUS
.
HAD_CONFIRM
},
]
}
const
DeliveryNoticeManagementAwaitSRM
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
formActions
=
createFormActions
()
const
controllerBtns
=
(<
Space
></
Space
>)
const
controllerBtns
=
(
<
Space
>
<
AuthButton
btnCode=
''
menuCode=
''
>
<
Button
type=
'primary'
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/order/deliveryNoticeManagement/awaitSRM/add`
)
}
>
新增
</
Button
>
</
AuthButton
>
</
Space
>
)
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'修改'
:
'DevTest'
,
...
...
@@ -46,8 +59,8 @@ const DeliveryNoticeManagementAwaitSRM: React.FC = () => {
'查看'
:
true
,
}
const
operationHandler
=
{
'修改'
:
()
=>
{
console
.
log
(
'修改 :>> '
,
)
},
'查看'
:
()
=>
{
console
.
log
(
'查看 :>> '
,
)
},
'修改'
:
()
=>
{
history
.
push
(
`/memberCenter/order/deliveryNoticeManagement/awaitSRM/edit?id=
${
record
.
id
}
`
)
},
'查看'
:
()
=>
{
history
.
push
(
`/memberCenter/order/deliveryNoticeManagement/awaitSRM/details?id=
${
record
.
id
}
`
)
},
}
return
(
<
TableOperation
...
...
@@ -57,25 +70,26 @@ const DeliveryNoticeManagementAwaitSRM: React.FC = () => {
/>
)
}
const
columns
:
ColumnType
<
unknown
>
[]
=
[
{
title
:
'通知单号'
,
dataIndex
:
'
id
'
,
key
:
'
id
'
,
dataIndex
:
'
noticeNo
'
,
key
:
'
noticeNo
'
,
width
:
160
,
render
:
(
text
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/deliveryNoticeManagement/awaitSRM/details'
>
{
text
}
</
EyePreview
>
render
:
(
text
:
unknown
,
record
:
any
)
=>
<
EyePreview
url=
{
`/memberCenter/order/deliveryNoticeManagement/awaitSRM/details?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'通知单摘要'
,
dataIndex
:
'
id2'
,
key
:
'id2
'
},
{
title
:
'送货日期'
,
dataIndex
:
'
id3'
,
key
:
'id3
'
},
{
title
:
'采购会员'
,
dataIndex
:
'
id5'
,
key
:
'id5
'
},
{
title
:
'单据时间'
,
dataIndex
:
'
id4'
,
key
:
'id4
'
},
{
title
:
'通知单摘要'
,
dataIndex
:
'
digest'
,
key
:
'digest
'
},
{
title
:
'送货日期'
,
dataIndex
:
'
deliveryTime'
,
key
:
'deliveryTime
'
},
{
title
:
'采购会员'
,
dataIndex
:
'
memberName'
,
key
:
'memberName
'
},
{
title
:
'单据时间'
,
dataIndex
:
'
createTime'
,
key
:
'createTime
'
},
{
title
:
'外部状态'
,
dataIndex
:
'
id6
'
,
key
:
'
id6
'
,
dataIndex
:
'
status
'
,
key
:
'
status
'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
<
Tag
color=
{
tagStatusColor
[
record
.
id3
]?.
color
}
>
<
span
style=
{
{
color
:
tagStatusColor
[
record
.
id3
]?.
fontColor
}
}
>
{
text
}
</
span
>
<
Tag
color=
{
TAG_STATUS_COLOR
[
text
]?.
color
}
>
<
span
style=
{
{
color
:
TAG_STATUS_COLOR
[
text
]?.
fontColor
}
}
>
{
STATUS_NAME
[
text
]
}
</
span
>
</
Tag
>
)
},
...
...
@@ -88,22 +102,17 @@ const DeliveryNoticeManagementAwaitSRM: React.FC = () => {
},
]
const
fetchData
=
(
params
:
unknown
)
=>
{
console
.
log
(
'params :>> '
,
params
);
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
)
=>
{
const
data
=
{
totalCount
:
1
,
data
:
[
{
id
:
1
,
id2
:
2
,
id3
:
4
,
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
},
]
}
getOrderDeliveryNoticeOrderVendorPage
({
...
params
,
orderType
:
ORDER_TYPE
.
SRM
,
status
:
OUTER_STATUS
.
WAIT_SUBMIT
}).
then
(({
code
,
data
})
=>
{
if
(
code
===
1000
)
{
resolve
(
data
)
}
})
})
}
...
...
@@ -127,7 +136,7 @@ const DeliveryNoticeManagementAwaitSRM: React.FC = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
planCode
'
,
'
noticeNo
'
,
FORM_FILTER_PATH
,
)
}
}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/schema/index.tsx
View file @
0b242de3
...
...
@@ -26,7 +26,7 @@ export const deliveryNoticeManagementSRMSchema: ISchema = {
children
:
'{{controllerBtns}}'
,
},
},
planCode
:
{
noticeNo
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
...
...
@@ -48,25 +48,25 @@ export const deliveryNoticeManagementSRMSchema: ISchema = {
},
},
properties
:
{
abstrac
t
:
{
diges
t
:
{
type
:
'string'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'通知单摘要'
}
},
'[start
Time, endTim
e]'
:
{
'[start
Date, endDat
e]'
:
{
type
:
'daterange'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
[
'送货开始日期'
,
'送货结束日期'
],
},
},
supplyMember
:
{
memberName
:
{
type
:
'string'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'
供应
会员'
placeholder
:
'
采购
会员'
}
},
submit
:
{
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeQuery/components/ToVoidModal/index.tsx
0 → 100644
View file @
0b242de3
import
{
useState
,
useImperativeHandle
,
forwardRef
,
useRef
}
from
'react'
import
{
Modal
,
Input
,
Form
,
message
}
from
'antd'
import
{
postOrderDeliveryNoticeOrderInvalid
}
from
'@/services/OrderNewV2Api'
import
dayjs
from
"dayjs"
export
type
HandleType
=
{
show
:
(
flag
:
boolean
,
id
?:
string
|
number
)
=>
void
;
}
type
PropsType
=
{
onOk
:
()
=>
void
;
}
const
TextArea
=
Input
.
TextArea
const
ToVoidModal
=
({
onOk
}:
PropsType
,
ref
:
any
)
=>
{
const
[
form
]
=
Form
.
useForm
()
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
)
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
idRef
=
useRef
<
string
|
number
>
();
const
_onOk
=
()
=>
{
form
.
validateFields
().
then
((
values
)
=>
{
setLoading
(
true
)
postOrderDeliveryNoticeOrderInvalid
({
id
:
idRef
.
current
,
...
values
}).
then
(({
code
,
data
})
=>
{
if
(
code
===
1000
)
{
message
.
success
(
'已作废'
)
setVisible
(
false
)
onOk
?.()
}
}).
finally
(()
=>
{
setLoading
(
false
)
})
})
}
useImperativeHandle
(
ref
,
()
=>
({
show
(
flag
:
boolean
,
id
:
string
|
number
)
{
id
&&
(
idRef
.
current
=
id
);
setVisible
(
flag
)
}
}))
return
(
<
Modal
title=
{
'作废原因'
}
maskClosable=
{
false
}
destroyOnClose
visible=
{
visible
}
onOk=
{
_onOk
}
okText=
'保存'
onCancel=
{
()
=>
setVisible
(
false
)
}
confirmLoading=
{
loading
}
>
<
Form
form=
{
form
}
>
<
Form
.
Item
name=
"time"
label=
"作废时间"
required
initialValue=
{
dayjs
(
new
Date
()).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
>
<
Input
disabled
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"remark"
label=
"作废原因"
required
rules=
{
[
{
required
:
true
,
message
:
'请输入作废原因'
},
{
pattern
:
/^
[\u
4e00-
\u
9fa5
]
{0,50}|
[
0-9a-zA-Z
]
{0,100}$/
,
message
:
'最大100个字符,50个文字'
}
]
}
>
<
TextArea
rows=
{
3
}
maxLength=
{
100
}
placeholder=
"请输入作废原因(最大100个字符,50个文字)"
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
)
}
export
default
forwardRef
(
ToVoidModal
)
src/pages/order/deliveryNoticeManagement/deliveryNoticeQuery/details.tsx
View file @
0b242de3
...
...
@@ -3,89 +3,100 @@
* @author: Gavin
* @description:
*/
import
React
,
{
useState
}
from
'react'
import
React
,
{
use
Effect
,
use
State
}
from
'react'
import
AnchorPage
,
{
AnchorsItem
}
from
'@/components/AnchorPage'
import
{
history
}
from
'umi'
import
{
history
,
useLocation
}
from
'umi'
import
{
Circulation
,
ConfirmDeliveryPlan
,
DeliveryNoticeDetaitlsAnchors
,
Purchaser
,
SubmitDeliveryPlan
,
Supplier
,
BaseInfo
as
base_Info
,
NoticeNo
,
BuyerLabel
,
NoticeSummary
,
ExternalState
,
ShippingInfo
,
DeliveryDate
,
DeliveryTime
,
ReceivingAddress
,
DeliveryList
,
ExternalRoamRecord
,
}
from
'../../constants'
import
BaseInfo
from
'@/components/BaseInfo/BaseInfo'
import
StandardTable
from
'@/components/StandardTable'
import
{
Steps
,
Table
,
Tag
}
from
'antd'
import
{
DeliveryMaterialsTableColumn
,
ExternalRoamRecordTableColumn
}
from
'../../constants/page-table-column'
import
{
getOrderDeliveryNoticeOrderDetail
,
getOrderDeliveryNoticeOrderDetailPage
,
getOrderDeliveryNoticeOrderDeliveryHistory
}
from
'@/services/OrderNewV2Api'
import
{
STATUS_NAME
}
from
'../constant'
const
DeliveryNoticeManagementDetails
:
React
.
FC
=
()
=>
{
const
id
=
history
.
location
?.
query
?.
id
const
[
iAnchors
,
setiAnchors
]
=
useState
<
AnchorsItem
[]
>
(
DeliveryNoticeDetaitlsAnchors
)
const
[
details
,
setDetails
]
=
useState
<
any
>
({})
const
getDetail
=
async
()
=>
{
if
(
id
)
{
const
{
code
,
data
}
=
await
getOrderDeliveryNoticeOrderDetail
({
id
});
if
(
code
===
1000
)
{
setDetails
(
data
||
{})
}
}
}
const
fetchData
=
(
api
:
Function
,
params
:
any
)
=>
{
return
new
Promise
((
resolve
)
=>
{
api
({
...
params
,
orderId
:
id
}).
then
(({
code
,
data
})
=>
{
if
(
code
===
1000
)
{
resolve
(
data
)
}
})
})
}
useEffect
(()
=>
{
getDetail
()
},
[])
return
(
<
AnchorPage
title=
{
details
?.
n
ame
||
'没有title'
}
title=
{
details
?.
n
oticeNo
}
onBack=
{
()
=>
history
.
goBack
()
}
anchors=
{
iAnchors
}
>
<
BaseInfo
className=
'mt-0'
title=
{
Circulation
.
name
}
id=
{
Circulation
.
key
}
cols=
{
1
}
>
<
Steps
progressDot
current=
{
0
}
>
<
Steps
progressDot
current=
{
details
.
outerStatus
-
1
}
>
<
Steps
.
Step
title=
{
Purchaser
}
description=
{
SubmitDeliveryPlan
}
/>
<
Steps
.
Step
title=
{
Supplier
}
description=
{
ConfirmDeliveryPlan
}
/>
</
Steps
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
base_Info
.
name
}
id=
{
base_Info
.
key
}
>
<
BaseInfo
.
BaseInfoItem
label=
{
NoticeNo
}
>
DL2014070100001
{
details
.
noticeNo
}
</
BaseInfo
.
BaseInfoItem
>
<
BaseInfo
.
BaseInfoItem
label=
{
BuyerLabel
}
>
温州龙昌手袋有限公司
{
details
.
buyerMemberName
}
</
BaseInfo
.
BaseInfoItem
>
<
BaseInfo
.
BaseInfoItem
label=
{
NoticeSummary
}
>
2014-07-01~2014-07-31 广州白马皮具交易中心送货计划
{
details
.
digest
}
</
BaseInfo
.
BaseInfoItem
>
<
BaseInfo
.
BaseInfoItem
label=
{
ExternalState
}
>
<
Tag
color=
'green'
>
已提交
</
Tag
>
<
Tag
color=
'green'
>
{
STATUS_NAME
[
details
.
status
]
}
</
Tag
>
</
BaseInfo
.
BaseInfoItem
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
ShippingInfo
.
name
}
id=
{
ShippingInfo
.
key
}
>
<
BaseInfo
.
BaseInfoItem
label=
{
DeliveryDate
}
>
2020-08-25
{
details
.
deliveryTime
}
</
BaseInfo
.
BaseInfoItem
>
<
BaseInfo
.
BaseInfoItem
label=
{
ReceivingAddress
}
>
<
div
>
李四/18600001999
</
div
>
<
div
>
广东省东莞市南城区鸿福东路1068号美居中心6楼 李四/18600001999
</
div
>
<
div
>
{
details
.
consignee
}
/
{
details
.
phone
}
</
div
>
<
div
>
{
details
.
provinceName
}{
details
.
cityName
}{
details
.
districtName
}{
details
.
streetName
}{
details
.
address
}
</
div
>
</
BaseInfo
.
BaseInfoItem
>
<
BaseInfo
.
BaseInfoItem
label=
{
DeliveryTime
}
>
08:00 至 12:00
{
details
.
deliveryStartTime
}
至
{
details
.
deliveryEndTime
}
</
BaseInfo
.
BaseInfoItem
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
DeliveryList
.
name
}
id=
{
DeliveryList
.
key
}
cols=
{
1
}
>
{
/* SRM 物料列表(DeliveryMaterialsTableColumn), B2B商品列表(DeliveryGoodsTableColumn) */
}
<
Table
rowKey=
{
'id'
}
dataSource=
{
[{
id
:
'1'
,
'name1'
:
'1'
,
'name2'
:
'2'
,
'name3'
:
'3'
,
'name4'
:
'4'
,
'name5'
:
'5'
,
'name6'
:
'6'
,
'name7'
:
'7'
,
'name8'
:
'8'
,
'name9'
:
'6'
,
},]
}
<
StandardTable
columns=
{
DeliveryMaterialsTableColumn
}
tableProps=
{
{
rowKey
:
'id'
,
}
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
getOrderDeliveryNoticeOrderDetailPage
,
{
...
params
,
orderId
:
id
})
}
controlRender=
{
<
div
></
div
>
}
/>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
ExternalRoamRecord
.
name
}
id=
{
ExternalRoamRecord
.
key
}
cols=
{
1
}
>
<
Table
rowKey=
{
'id'
}
dataSource=
{
[{
id
:
'1'
,
'name1'
:
'1'
,
'name2'
:
'操作角色'
,
'name3'
:
'状态'
,
'name4'
:
'操作'
,
'name5'
:
'操作时间'
,
'name6'
:
'备注'
,
},]
}
<
StandardTable
columns=
{
ExternalRoamRecordTableColumn
}
tableProps=
{
{
rowKey
:
'id'
,
}
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
getOrderDeliveryNoticeOrderDeliveryHistory
,
{
...
params
,
id
})
}
controlRender=
{
<
div
></
div
>
}
/>
</
BaseInfo
>
</
AnchorPage
>
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeQuery/index.tsx
View file @
0b242de3
...
...
@@ -3,9 +3,10 @@
* @author: Gavin
* @description:
*/
import
React
,
{
useRef
,
useState
}
from
'react'
import
React
,
{
useRef
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Button
,
Card
,
Space
,
Tag
}
from
'antd'
import
{
Modal
,
Card
,
Space
,
Tag
}
from
'antd'
import
{
history
,
useIntl
}
from
'umi'
;
import
StandardTable
from
'@/components/StandardTable'
import
{
ColumnType
}
from
'antd/lib/table'
import
TableOperation
from
'@/components/TableOperation'
...
...
@@ -15,45 +16,46 @@
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
deliveryNoticeManagementQuerySchema
}
from
'./schema'
import
{
getOrderDeliveryNoticeOrderVendorPage
}
from
'@/services/OrderNewV2Api'
import
{
TAG_STATUS_COLOR
,
STATUS
,
STATUS_NAME
}
from
'../constant'
import
ToVoidModal
,
{
HandleType
}
from
'./components/ToVoidModal'
const
tagStatusColor
=
{
// 待提交
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
mock
=
{
totalCount
:
4
,
data
:
[
{
id
:
1
,
noticeNo
:
'2e12e'
,
status
:
STATUS
.
WAIT_CONFIRM
},
{
id
:
2
,
noticeNo
:
'axascac'
,
status
:
STATUS
.
WAIT_REVISE
},
{
id
:
3
,
noticeNo
:
'fafa'
,
status
:
STATUS
.
HAD_CONFIRM
},
{
id
:
4
,
noticeNo
:
'fasffqw'
,
status
:
STATUS
.
HAD_CONFIRM
},
]
}
const
DeliveryNoticeManagementQuery
:
React
.
FC
=
()
=>
{
const
intl
=
useIntl
()
const
ref
=
useRef
<
any
>
({})
const
toVoidModalRef
=
useRef
<
HandleType
>
()
const
formActions
=
createFormActions
()
const
controllerBtns
=
(<
Space
></
Space
>)
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'生
产
送货单'
:
'DevTest'
,
'生
成
送货单'
:
'DevTest'
,
'变更'
:
'DevTest'
,
'作废'
:
'DevTest'
,
'查看'
:
'DevTest'
,
}
const
buttonGroup
=
{
'生
产送货单'
:
true
,
'变更'
:
true
,
'作废'
:
true
,
'生
成送货单'
:
[
STATUS
.
HAD_CONFIRM
].
includes
(
record
.
status
)
,
'变更'
:
[
STATUS
.
HAD_CONFIRM
].
includes
(
record
.
status
)
,
'作废'
:
[
STATUS
.
WAIT_CONFIRM
,
STATUS
.
WAIT_REVISE
,
STATUS
.
HAD_CONFIRM
].
includes
(
record
.
status
)
,
'查看'
:
true
,
}
const
operationHandler
=
{
'生
产送货单'
:
()
=>
{
console
.
log
(
'生产送货单 :>> '
,)
},
'生
成送货单'
:
()
=>
{
},
'变更'
:
()
=>
{
console
.
log
(
'变更 :>> '
,)
},
'作废'
:
()
=>
{
console
.
log
(
'作废 :>> '
,
)
},
'查看'
:
()
=>
{
console
.
log
(
'查看 :>> '
,
)
},
'作废'
:
()
=>
{
toVoidModalRef
.
current
.
show
(
true
,
record
.
id
)
},
'查看'
:
()
=>
{
history
.
push
(
`/memberCenter/order/deliveryNoticeManagement/query/details?id=
${
record
.
id
}
`
)
},
}
return
(
<
TableOperation
...
...
@@ -66,22 +68,22 @@ const DeliveryNoticeManagementQuery: React.FC = () => {
const
columns
:
ColumnType
<
unknown
>
[]
=
[
{
title
:
'通知单号'
,
dataIndex
:
'
id
'
,
key
:
'
id
'
,
dataIndex
:
'
noticeNo
'
,
key
:
'
noticeNo
'
,
width
:
160
,
render
:
(
text
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/deliveryNoticeManagement/query/details'
>
{
text
}
</
EyePreview
>
render
:
(
text
:
unknown
,
record
:
any
)
=>
<
EyePreview
url=
{
`/memberCenter/order/deliveryNoticeManagement/query/details?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'通知单摘要'
,
dataIndex
:
'
id2'
,
key
:
'id2
'
},
{
title
:
'送货日期'
,
dataIndex
:
'
id3'
,
key
:
'id3
'
},
{
title
:
'采购会员'
,
dataIndex
:
'
id5'
,
key
:
'id5
'
},
{
title
:
'单据时间'
,
dataIndex
:
'
id4'
,
key
:
'id4
'
},
{
title
:
'通知单摘要'
,
dataIndex
:
'
digest'
,
key
:
'digest
'
},
{
title
:
'送货日期'
,
dataIndex
:
'
deliveryTime'
,
key
:
'deliveryTime
'
},
{
title
:
'采购会员'
,
dataIndex
:
'
memberName'
,
key
:
'memberName
'
},
{
title
:
'单据时间'
,
dataIndex
:
'
createTime'
,
key
:
'createTime
'
},
{
title
:
'外部状态'
,
dataIndex
:
'
id6
'
,
key
:
'
id6
'
,
dataIndex
:
'
status
'
,
key
:
'
status
'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
<
Tag
color=
{
tagStatusColor
[
record
.
id
]?.
color
}
>
<
span
style=
{
{
color
:
tagStatusColor
[
record
.
id
]?.
fontColor
}
}
>
{
text
}
</
span
>
<
Tag
color=
{
TAG_STATUS_COLOR
[
text
]?.
color
}
>
<
span
style=
{
{
color
:
TAG_STATUS_COLOR
[
text
]?.
fontColor
}
}
>
{
STATUS_NAME
[
text
]
}
</
span
>
</
Tag
>
)
},
...
...
@@ -94,22 +96,14 @@ const DeliveryNoticeManagementQuery: React.FC = () => {
},
]
const
fetchData
=
(
params
:
unknown
)
=>
{
console
.
log
(
'params :>> '
,
params
);
const
fetchData
=
(
params
:
any
)
=>
{
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
},
]
}
getOrderDeliveryNoticeOrderVendorPage
(
params
).
then
(({
code
,
data
})
=>
{
if
(
code
===
1000
)
{
resolve
(
data
)
// resolve(mock)
}
})
})
}
...
...
@@ -133,7 +127,7 @@ const DeliveryNoticeManagementQuery: React.FC = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
planCode
'
,
'
noticeNo
'
,
FORM_FILTER_PATH
,
)
}
}
...
...
@@ -142,6 +136,11 @@ const DeliveryNoticeManagementQuery: React.FC = () => {
}
/>
</
Card
>
<
ToVoidModal
ref=
{
toVoidModalRef
}
onOk=
{
()
=>
ref
.
current
.
reload
()
}
/>
</
PageHeaderWrapper
>
)
}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeQuery/schema/index.tsx
View file @
0b242de3
...
...
@@ -26,7 +26,7 @@ export const deliveryNoticeManagementQuerySchema: ISchema = {
children
:
'{{controllerBtns}}'
,
},
},
planCode
:
{
noticeNo
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
...
...
@@ -48,25 +48,25 @@ export const deliveryNoticeManagementQuerySchema: ISchema = {
},
},
properties
:
{
abstrac
t
:
{
diges
t
:
{
type
:
'string'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'通知单摘要'
}
},
'[start
Time, endTim
e]'
:
{
'[start
Date, endDat
e]'
:
{
type
:
'daterange'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
[
'送货开始日期'
,
'送货结束日期'
],
},
},
supplyMember
:
{
memberName
:
{
type
:
'string'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'
供应
会员'
placeholder
:
'
采购
会员'
}
},
submit
:
{
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/apis/index.ts
View file @
0b242de3
...
...
@@ -16,6 +16,7 @@ export const fetchOrderApi = {
/** 请购单物料 获取商品货品列表 */
async
getPurchaseRequesitionMaterielList
(
params
)
{
params
.
materialGroupId
=
params
.
materialGroupId
?
params
.
materialGroupId
?.
pop
()
:
''
const
{
data
}
=
await
getProductGoodsGetGoodsList
(
params
)
return
data
},
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/components/materialModalTable/index.tsx
View file @
0b242de3
...
...
@@ -8,13 +8,16 @@ import Search from '@/components/NiceForm/components/Search'
import
Submit
from
'@/components/NiceForm/components/Submit'
;
import
Children
from
'@/components/NiceForm/components/Children'
;
import
{
addRequesitionMaterialSchema
}
from
'../../schema/modal'
import
{
Tooltip
}
from
'antd'
import
{
Cascader
,
Tooltip
}
from
'antd'
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
import
{
clearModalParams
}
from
'@/utils'
import
CustomCategorySearch
from
'@/components/NiceForm/components/CustomCategorySearch'
import
CustomInputSearch
from
'@/components/NiceForm/components/CustomInputSearch'
import
{
searchBrandOptionEffect
,
searchCustomerCategoryOptionEffect
}
from
'../../effects'
import
{
useIntl
,
getIntl
}
from
'umi'
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
import
{
getProductMaterialGroupTree
}
from
'@/services/ProductV2Api'
import
{
fetchTreeData
,
useAsyncCascader
}
from
'./useGetTableSearchData'
export
interface
MaterialModalTableProps
extends
ModalTableProps
{
type
?:
'radio'
|
'checkbox'
,
...
...
@@ -46,6 +49,17 @@ export const materialColumns: any[] = [
key
:
'name'
,
},
{
title
:
"物料组"
,
dataIndex
:
'materialGroup'
,
align
:
'center'
,
key
:
'materialGroup'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
>
{
record
.
name
}
</
div
>
)
}
},
{
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.guigexinghao'
,
defaultMessage
:
'规格型号'
}),
dataIndex
:
'type'
,
align
:
'center'
,
...
...
@@ -71,7 +85,7 @@ export const materialColumns: any[] = [
},
]
const
MaterialModalTable
:
React
.
FC
<
MaterialModalTableProps
>
=
(
props
)
=>
{
const
MaterialModalTable
:
React
.
FC
<
MaterialModalTableProps
>
=
(
props
)
=>
{
const
intl
=
useIntl
()
const
{
type
=
'checkbox'
,
schemaAction
,
confirmModal
,
currentRef
,
sectionProps
,
...
restProps
}
=
props
const
{
visible
,
setVisible
,
rowSelection
,
rowSelectionCtl
}
=
sectionProps
...
...
@@ -89,11 +103,11 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
const
addMaterialProcessField
=
(
value
,
origin
)
=>
{
let
tempOriginData
=
[...
origin
]
// 对选中值去重
const
_value
=
Object
.
values
(
value
.
reduce
((
item
,
next
)
=>
{
const
_value
=
Object
.
values
(
value
.
reduce
((
item
,
next
)
=>
{
item
[
next
.
id
]
=
next
return
item
},{}))
if
(
Array
.
isArray
(
_value
))
{
},
{}))
if
(
Array
.
isArray
(
_value
))
{
let
processData
=
_value
.
map
(
v
=>
{
let
temp
:
any
=
{};
temp
.
id
=
v
.
id
;
...
...
@@ -108,7 +122,7 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
})
let
originIds
=
tempOriginData
.
map
(
item
=>
item
.
id
)
processData
.
map
(
item
=>
{
if
(
!
originIds
.
includes
(
item
.
id
))
{
if
(
!
originIds
.
includes
(
item
.
id
))
{
tempOriginData
.
push
(
item
)
}
})
...
...
@@ -123,14 +137,14 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
setVisible
(
false
)
clearModalParams
()
}
// http://10.0.0.25:4000/project/1301/interface/api/189388
const
handleCancel
=
()
=>
{
setVisible
(
false
)
clearModalParams
()
}
const
otherHandle
=
<>
<
a
className=
"ant-btn"
href=
"/memberCenter/commodityAbility/commodity/goods/add"
target=
"_blank"
style=
{
{
marginRight
:
16
}
}
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.xinzenghuopin'
,
defaultMessage
:
'新增货品'
})
}
</
a
>
<
a
className=
"ant-btn"
href=
"/memberCenter/commodityAbility/commodity/goods/add"
target=
"_blank"
style=
{
{
marginRight
:
16
}
}
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.xinzenghuopin'
,
defaultMessage
:
'新增货品'
})
}
</
a
>
<
Tooltip
title=
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.dianjichaxun'
,
defaultMessage
:
'点击查询,列表可显示新增的物料'
})
}
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
...
...
@@ -146,7 +160,7 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
cancel=
{
handleCancel
}
fetchTableData=
{
fetchOrderApi
.
getPurchaseRequesitionMaterielList
}
rowSelection=
{
rowSelection
}
resetModal=
{
{
destroyOnClose
:
true
}
}
resetModal=
{
{
destroyOnClose
:
true
}
}
modalType=
'none'
tableProps=
{
{
rowKey
:
'id'
,
...
...
@@ -165,7 +179,8 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
Submit
,
Children
,
CustomInputSearch
,
CustomCategorySearch
CustomCategorySearch
,
Cascader
},
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
...
...
@@ -174,6 +189,7 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
'code'
,
FORM_FILTER_PATH
,
);
useAsyncCascader
(
'materialGroupId'
,
fetchTreeData
)
FormEffectHooks
.
onFieldChange$
(
'brandId'
).
subscribe
(()
=>
{
searchBrandOptionEffect
(
actions
,
'brandId'
)
})
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/components/materialModalTable/useGetTableSearchData.tsx
0 → 100644
View file @
0b242de3
import
{
getProductMaterialGroupTree
}
from
"@/services/ProductV2Api"
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
"@formily/antd"
const
{
onFormMount$
}
=
FormEffectHooks
const
EMPTY_ARRAY
=
[]
export
const
EMPTY
=
{
totalCount
:
0
,
data
:
[],
}
export
const
useAsyncCascader
=
async
(
name
,
service
:
()
=>
Promise
<
any
[]
>
)
=>
{
const
{
setFieldState
}
=
createFormActions
()
onFormMount$
().
subscribe
(()
=>
{
service
().
then
(
res
=>
{
setFieldState
(
name
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.x-component-props.options'
,
res
)
})
}).
catch
(
err
=>
{
setFieldState
(
name
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.x-component-props.options'
,
[])
})
})
})
}
export
const
fetchTreeData
=
async
()
=>
{
try
{
const
{
data
,
code
}
=
await
getProductMaterialGroupTree
({
rootNodeId
:
'0'
});
if
(
code
===
1000
)
{
return
data
;
}
return
EMPTY_ARRAY
}
catch
{
return
EMPTY_ARRAY
}
}
src/pages/transaction/purchaseRequisition/increaseRequisition/index.less
View file @
0b242de3
...
...
@@ -4,4 +4,19 @@
width: 100%;
}
}
.RadioMian{
display: flex;
.RadioItem{
border-radius: 4px;
background: #F5F6F7;
padding: 5px 10px;
margin-right: 10px;
}
.Select{
background: rgba(0,169,143,0.04);
border: 1px solid #00A98F;
}
}
}
src/pages/transaction/purchaseRequisition/increaseRequisition/index.tsx
View file @
0b242de3
import
React
,
{
useRef
,
useState
,
useEffect
}
from
'react'
import
React
,
{
useRef
,
useState
,
useEffect
,
useMemo
}
from
'react'
import
{
history
,
useIntl
}
from
'umi'
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
import
{
Button
,
Col
,
message
,
Row
,
Select
,
Upload
}
from
'antd'
import
{
Button
,
Col
,
message
,
R
adio
,
R
ow
,
Select
,
Upload
}
from
'antd'
import
{
createFormActions
,
registerVirtualBox
,
useFormSpy
}
from
'@formily/antd'
import
{
SaveOutlined
,
LinkOutlined
,
UploadOutlined
}
from
'@ant-design/icons'
import
NiceForm
from
'@/components/NiceForm'
...
...
@@ -26,6 +26,7 @@ import { UPLOAD_TYPE } from '@/constants'
import
styles
from
'./index.less'
import
{
getAuth
}
from
'@/utils/auth'
const
addSchemaAction
=
createFormActions
()
const
{
Option
}
=
Select
;
const
RowStyle
=
styled
(
props
=>
<
Row
style=
{
{
marginTop
:
12
,
justifyContent
:
"flex-end"
}
}
justify=
'end'
{
...
props
}
>
...
...
@@ -71,6 +72,9 @@ const IncreaseRequisition: React.FC<{}> = () => {
const
[
initFormValue
,
setInitFormValue
]
=
useState
<
any
>
({})
const
{
formContext
}
=
useFormDetail
()
const
rowvendorMemberInfoRef
=
useRef
<
any
>
({});
const
deliveryTypeListRef
=
useRef
<
any
>
({});
const
[
deliveryType
,
setdeliveryType
]
=
useState
(
''
);
const
[
deliveryTypeList
,
setdeliveryTypeList
]
=
useState
([]);
const
intl
=
useIntl
()
// 请购单物料
...
...
@@ -81,37 +85,60 @@ const IncreaseRequisition: React.FC<{}> = () => {
setFormLoading
(
true
)
getPurchaseRequisitionDetail
({
id
}).
then
((
res
:
any
)
=>
{
const
{
data
}
=
res
console
.
log
(
data
,
'data'
)
const
_orderProductRequests
=
procurementRenderField
(
data
)
addSchemaAction
.
setFieldState
(
'deliveryAddressId'
,
state
=>
{
state
.
props
.
isDefaultAddress
=
false
;
state
.
visible
=
data
.
deliveryMethod
==
1
?
true
:
false
;
});
addSchemaAction
.
setFieldState
(
'deliveryAddress'
,
state
=>
{
state
.
visible
=
data
.
deliveryMethod
!=
1
?
true
:
false
;
});
if
(
data
.
deliveryType
)
{
if
(
data
.
deliveryMethod
==
1
)
{
deliveryTypeListRef
.
current
.
deliveryTypeList
=
deliveryTypeListRef
.
current
.
deliveryTypeList
.
map
(
item
=>
{
return
{
...
item
,
disabled
:
false
}
})
setdeliveryTypeList
(
deliveryTypeListRef
.
current
.
deliveryTypeList
)
}
if
(
data
.
deliveryMethod
==
2
)
{
deliveryTypeListRef
.
current
.
deliveryTypeList
=
deliveryTypeListRef
.
current
.
deliveryTypeList
.
map
(
item
=>
{
return
{
...
item
,
disabled
:
item
.
disabled
=
item
.
deliveryTypeName
==
'直送客户'
?
true
:
false
}
})
setdeliveryTypeList
(
deliveryTypeListRef
.
current
.
deliveryTypeList
)
}
addSchemaAction
.
setFieldState
(
'deliveryType'
,
state
=>
{
state
.
visible
=
true
;
});
setdeliveryType
(
data
.
deliveryType
)
}
setInitFormValue
(()
=>
procurmentRenderInit
(
data
))
setTimeout
(()
=>
{
addSchemaAction
.
setFieldValue
(
'products'
,
_orderProductRequests
)
addSchemaAction
.
setFieldValue
(
'attachments'
,
data
.
attachments
)
addSchemaAction
.
setFieldValue
(
'deliveryAddressId'
,
data
.
receiverAddressResponse
)
addSchemaAction
.
setFieldValue
(
'deliveryType'
,
data
.
deliveryType
)
},
500
)
setFormLoading
(
false
)
})
}
else
{
const
userInfo
=
getAuth
();
const
userInfo
:
any
=
getAuth
();
addSchemaAction
.
setFieldValue
(
'requisitioner'
,
userInfo
.
name
)
addSchemaAction
.
setFieldValue
(
'requisitionerId'
,
userInfo
.
userId
)
if
(
userInfo
.
orgId
&&
userInfo
.
orgName
)
{
addSchemaAction
.
setFieldValue
(
'vendorMemberName'
,
userInfo
.
orgName
||
''
)
addSchemaAction
.
setFieldValue
(
'deliveryType'
,
userInfo
.
orgId
||
''
)
}
}
},
[])
const
setLik
=
(
row
)
=>
{
console
.
log
(
row
)
rowvendorMemberInfoRef
.
current
=
row
;
}
const
Jump
=
()
=>
{
if
(
Object
.
keys
(
rowvendorMemberInfoRef
.
current
).
length
)
{
history
.
push
(
`/memberAbility/manage/maintain/detail/basicInfo?id=
${
rowvendorMemberInfoRef
.
current
.
memberId
}
&validateId=
${
rowvendorMemberInfoRef
.
current
.
id
}
`
)
history
.
push
(
`/member
Center/member
Ability/manage/maintain/detail/basicInfo?id=
${
rowvendorMemberInfoRef
.
current
.
memberId
}
&validateId=
${
rowvendorMemberInfoRef
.
current
.
id
}
`
)
}
}
// 供应会员
...
...
@@ -174,6 +201,27 @@ const IncreaseRequisition: React.FC<{}> = () => {
const
handleOrderMember
=
()
=>
{
memberRef
.
current
.
setVisible
(
true
)
}
// 配送方式
const
changeDeliveryType
=
(
e
)
=>
{
addSchemaAction
.
setFieldValue
(
'deliveryType'
,
e
.
target
.
value
)
}
// 自定义组建
const
RadioNode
=
()
=>
{
return
(
<
Radio
.
Group
onChange=
{
changeDeliveryType
}
defaultValue=
{
id
?
deliveryType
:
""
}
>
<
div
className=
{
styles
.
RadioMian
}
>
{
deliveryTypeList
.
map
((
item
)
=>
(
<
div
className=
{
`${styles.RadioItem} ${item.deliveryType == deliveryType ? styles.Select : ''}`
}
key=
{
item
.
deliveryType
}
>
<
Radio
value=
{
item
.
deliveryType
}
disabled=
{
item
.
disabled
}
>
{
item
.
deliveryTypeName
}
</
Radio
>
</
div
>
))
}
</
div
>
</
Radio
.
Group
>
)
}
const
memberBtn
=
<
div
className=
'connectBtn'
onClick=
{
handleOrderMember
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.xuanze'
,
defaultMessage
:
'选择'
})
}
</
div
>
...
...
@@ -278,10 +326,12 @@ const IncreaseRequisition: React.FC<{}> = () => {
}
const
fetchOptions
=
(
service
)
=>
{
console
.
log
(
service
,
'service'
)
return
async
function
()
{
const
res
=
await
service
();
if
(
res
.
code
===
1000
)
{
const
deliveryTypeList
=
res
.
data
.
deliveryTypes
.
map
(
item
=>
{
return
{
...
item
,
disabled
:
true
}
})
deliveryTypeListRef
.
current
.
deliveryTypeList
=
deliveryTypeList
;
setdeliveryTypeList
(
deliveryTypeList
)
return
res
.
data
.
deliveryMethods
.
map
((
item
)
=>
{
return
{
label
:
item
.
deliveryMethodName
,
value
:
item
.
deliveryMethod
}
})
}
return
[];
...
...
@@ -334,6 +384,9 @@ const IncreaseRequisition: React.FC<{}> = () => {
actions=
{
addSchemaAction
}
schema=
{
increaseSchema
}
onSubmit=
{
handleSubmit
}
components=
{
{
RadioNode
}
}
effects=
{
(
$
,
ctx
)
=>
{
$
(
'onFormMount'
).
subscribe
(()
=>
{
})
useEditHideField
()
...
...
@@ -351,20 +404,39 @@ const IncreaseRequisition: React.FC<{}> = () => {
formContext
.
useAttachmentChangeForContext
(
ctx
)
$
(
'onFieldChange'
,
'deliveryMethod'
).
subscribe
(
res
=>
{
if
(
res
.
value
===
2
)
{
if
(
res
.
values
[
1
]?.
title
===
"物流"
)
{
deliveryTypeListRef
.
current
.
deliveryTypeList
=
deliveryTypeListRef
.
current
.
deliveryTypeList
.
map
(
item
=>
{
return
{
...
item
,
disabled
:
false
}
})
setdeliveryTypeList
(
deliveryTypeListRef
.
current
.
deliveryTypeList
)
addSchemaAction
.
setFieldState
(
'deliveryAddress'
,
state
=>
{
state
.
visible
=
false
;
});
addSchemaAction
.
setFieldValue
(
'deliveryType'
,
""
)
addSchemaAction
.
setFieldState
(
'deliveryAddressId'
,
state
=>
{
state
.
visible
=
true
;
});
}
else
{
addSchemaAction
.
setFieldState
(
'deliveryType'
,
state
=>
{
state
.
visible
=
true
;
});
}
if
(
res
.
values
[
1
]?.
title
===
"自提"
)
{
deliveryTypeListRef
.
current
.
deliveryTypeList
=
deliveryTypeListRef
.
current
.
deliveryTypeList
.
map
(
item
=>
{
return
{
...
item
,
disabled
:
item
.
disabled
=
item
.
deliveryTypeName
==
'直送客户'
?
true
:
false
}
})
setdeliveryTypeList
(
deliveryTypeListRef
.
current
.
deliveryTypeList
)
addSchemaAction
.
setFieldState
(
'deliveryType'
,
state
=>
{
state
.
visible
=
true
;
});
addSchemaAction
.
setFieldValue
(
'deliveryType'
,
""
)
}
if
(
res
.
values
[
1
]?.
title
===
"无需配送"
)
{
deliveryTypeListRef
.
current
.
deliveryTypeList
=
deliveryTypeListRef
.
current
.
deliveryTypeList
&&
deliveryTypeListRef
.
current
?.
deliveryTypeList
.
map
(
item
=>
{
return
{
...
item
,
disabled
:
true
}
})
setdeliveryTypeList
(
deliveryTypeListRef
.
current
.
deliveryTypeList
)
addSchemaAction
.
setFieldState
(
'deliveryAddress'
,
state
=>
{
state
.
visible
=
true
;
});
addSchemaAction
.
setFieldState
(
'deliveryAddressId'
,
state
=>
{
state
.
visible
=
false
;
});
addSchemaAction
.
setFieldValue
(
'deliveryType'
,
""
)
}
})
...
...
@@ -380,6 +452,7 @@ const IncreaseRequisition: React.FC<{}> = () => {
enclosureColumns
,
enclosureColumnsButton
,
vendorMemberNameNode
,
}
}
/>
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/schema/index.ts
View file @
0b242de3
...
...
@@ -187,6 +187,16 @@ const delivery: ISchema = {
span
:
1
}
},
deliveryType
:
{
type
:
'string'
,
visible
:
false
,
title
:
"客户配送方式"
,
"x-component"
:
'RadioNode'
,
"x-component-props"
:
{
span
:
1
,
},
},
//
deliveryAddressId
:
{
visible
:
false
,
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/schema/modal.ts
View file @
0b242de3
...
...
@@ -66,6 +66,17 @@ import { getIntl } from 'umi';
fieldNames
:
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
},
},
},
materialGroupId
:
{
type
:
'string'
,
'x-component'
:
'Cascader'
,
'x-component-props'
:
{
placeholder
:
'物料组'
,
allowClear
:
true
,
fieldNames
:
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
},
style
:
{
width
:
'150px'
},
showSearch
:
true
},
},
type
:
{
type
:
'string'
,
"x-component-props"
:
{
...
...
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