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
25d27061
Commit
25d27061
authored
Apr 06, 2022
by
rainbowmorel@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收货单 送货单查询 收货单管理
parent
7e10ef0c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
208 additions
and
122 deletions
+208
-122
LogisticsCompanyMerchantsSelect.tsx
...ogisticsCompanySelect/LogisticsCompanyMerchantsSelect.tsx
+2
-2
LogisticsCompanySelect.tsx
...ponents/LogisticsCompanySelect/LogisticsCompanySelect.tsx
+3
-2
RoleSelect.tsx
src/components/RoleSelect/RoleSelect.tsx
+4
-3
DeliveryNoteService.ts
src/pages/order/assets/handles/DeliveryNoteService.ts
+19
-2
HandleFormSubmit.ts
src/pages/order/assets/handles/HandleFormSubmit.ts
+38
-7
details.tsx
...pages/order/deliveryNotice/receivingNoteQuery/details.tsx
+87
-23
index.tsx
src/pages/order/deliveryNotice/receivingNoteQuery/index.tsx
+37
-59
add.tsx
src/pages/order/receivingNote/deliveryNoteManage/add.tsx
+0
-0
index.tsx
src/pages/order/receivingNote/deliveryNoteManage/index.tsx
+6
-3
index.tsx
src/pages/order/receivingNote/deliveryNoteQuery/index.tsx
+12
-21
No files found.
src/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect.tsx
View file @
25d27061
import
LogisticsCompanySelect
,
{
CooperateType
}
from
"./LogisticsCompanySelect"
function
LogisticsCompanyMerchantsSelect
(
props
)
{
const
{
onChange
,
value
}
=
props
;
const
{
onChange
,
value
,
disabled
=
false
}
=
props
;
return
(
<
LogisticsCompanySelect
value=
{
value
}
onChange=
{
onChange
}
cooperateType=
{
CooperateType
.
Merchants
}
/>
<
LogisticsCompanySelect
disabled=
{
disabled
}
value=
{
value
}
onChange=
{
onChange
}
cooperateType=
{
CooperateType
.
Merchants
}
/>
)
}
...
...
src/components/LogisticsCompanySelect/LogisticsCompanySelect.tsx
View file @
25d27061
...
...
@@ -11,11 +11,12 @@ interface LogisticsCompanySelectProps {
onChange
?:
(
value
)
=>
void
cooperateType
:
CooperateType
.
Platform
|
CooperateType
.
Merchants
value
?:
any
disabled
?:
boolean
}
function
LogisticsCompanySelect
(
props
:
LogisticsCompanySelectProps
)
{
const
{
onChange
,
cooperateType
,
value
}
=
props
;
const
{
onChange
,
cooperateType
,
value
,
disabled
=
false
}
=
props
;
const
[
options
,
setOptions
]
=
useState
([]);
useEffect
(()
=>
{
...
...
@@ -39,7 +40,7 @@ function LogisticsCompanySelect(props: LogisticsCompanySelectProps) {
}
return
(
<
Select
value=
{
value
}
options=
{
options
}
onChange=
{
(
v
)
=>
{
<
Select
disabled=
{
disabled
}
value=
{
value
}
options=
{
options
}
onChange=
{
(
v
)
=>
{
const
option
=
options
.
find
(
o
=>
{
return
o
.
value
==
v
})
...
...
src/components/RoleSelect/RoleSelect.tsx
View file @
25d27061
...
...
@@ -15,6 +15,7 @@ interface RoleSelectProps {
onChange
?:
(
e
)
=>
void
value
?:
any
formatFeils
?:
(
e
)
=>
any
disabled
?:
boolean
}
/**
...
...
@@ -24,7 +25,7 @@ interface RoleSelectProps {
*/
function
RoleSelect
(
props
:
RoleSelectProps
)
{
const
{
request
,
params
,
onChange
,
value
,
formatFeils
=
(
e
)
=>
e
}
=
props
const
{
request
,
params
,
onChange
,
value
,
formatFeils
=
(
e
)
=>
e
,
disabled
=
false
}
=
props
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
form
]
=
Form
.
useForm
()
...
...
@@ -55,10 +56,10 @@ function RoleSelect(props: RoleSelectProps) {
<>
<
Row
gutter=
{
4
}
>
<
Col
span=
{
18
}
>
<
Input
value=
{
value
?.
name
}
/>
<
Input
value=
{
value
?.
name
}
disabled=
{
disabled
}
/>
</
Col
>
<
Col
span=
{
6
}
>
<
Button
onClick=
{
showDrawer
}
>
选择采购会员
</
Button
>
<
Button
disabled=
{
disabled
}
onClick=
{
showDrawer
}
>
选择采购会员
</
Button
>
</
Col
>
</
Row
>
...
...
src/pages/order/assets/handles/DeliveryNoteService.ts
View file @
25d27061
...
...
@@ -2,7 +2,8 @@ import {
getOrderDeliveryOrderDetail
,
getOrderDeliveryOrderDetailProductPage
,
getOrderDeliveryOrderSrmPage
,
getOrderDeliveryOrderB2bPage
getOrderDeliveryOrderB2bPage
,
getOrderDeliveryOrderReceivePage
}
from
'@/services/OrderNewV2Api'
;
/**
...
...
@@ -55,8 +56,20 @@ class NoteB2bService extends NoteSrmService {
}
}
/**
* 送货单 收货单详情 服务
*/
class
NoteReceiveService
extends
NoteSrmService
{
getQuery
(
params
:
any
)
{
return
getOrderDeliveryOrderReceivePage
(
params
).
then
(
res
=>
{
return
res
.
data
})
}
}
export
default
class
NoteFactoryService
{
static
getInstance
(
noteType
:
string
=
"srm"
)
{
static
getInstance
(
noteType
:
"srm"
|
"b2b"
|
"receive"
=
"srm"
)
{
if
(
noteType
===
'srm'
)
{
return
new
NoteSrmService
()
}
...
...
@@ -64,6 +77,10 @@ export default class NoteFactoryService {
if
(
noteType
===
'b2b'
)
{
return
new
NoteB2bService
()
}
if
(
noteType
===
'receive'
)
{
return
new
NoteReceiveService
()
}
}
}
src/pages/order/assets/handles/HandleFormSubmit.ts
View file @
25d27061
...
...
@@ -5,7 +5,8 @@ import {
getOrderDeliveryOrderDetailProductPage
,
postOrderDeliveryOrderSrmCreate
,
postOrderDeliveryOrderUpdate
,
postOrderDeliveryOrderB2bCreate
postOrderDeliveryOrderB2bCreate
,
postOrderReceiveOrderCreate
}
from
'@/services/OrderNewV2Api'
;
import
moment
from
"moment"
;
...
...
@@ -78,12 +79,12 @@ export class HandleFormSubmit {
deliveryVO
:
{
...
data
.
deliverVO
,
shipperName
:
data
.
deliverVO
.
consignee
,
fullAddress
:
data
.
deliverVO
.
provinceName
+
data
.
deliverVO
.
cityName
+
data
.
deliverVO
.
districtName
+
data
.
deliverVO
.
streetName
??
''
fullAddress
:
data
.
deliverVO
.
provinceName
+
data
.
deliverVO
.
cityName
+
data
.
deliverVO
.
districtName
+
data
.
deliverVO
.
streetName
??
''
},
receiveVO
:
{
...
data
.
receiverBO
,
receiverName
:
data
.
receiverBO
.
consignee
,
fullAddress
:
data
.
receiverBO
.
provinceName
+
data
.
receiverBO
.
cityName
+
data
.
receiverBO
.
districtName
+
data
.
receiverBO
.
streetName
??
''
fullAddress
:
data
.
receiverBO
.
provinceName
+
data
.
receiverBO
.
cityName
+
data
.
receiverBO
.
districtName
+
data
.
receiverBO
.
streetName
??
''
},
deliveryType
:
data
.
deliveryType
,
"executorVO.phone"
:
data
.
executorVO
.
phone
,
...
...
@@ -94,7 +95,8 @@ export class HandleFormSubmit {
label
:
data
.
logisticsCompany
,
value
:
data
.
logisticsCompanyId
},
outerHistoryList
:
data
.
outerHistoryList
outerHistoryList
:
data
.
outerHistoryList
,
deliveryNo
:
data
.
deliveryNo
}
return
formField
})
...
...
@@ -147,7 +149,14 @@ export class ReceivingNoteAddService extends HandleFormSubmit {
export
class
DeliveryNoteAddService
extends
HandleFormSubmit
{
handleBeforeFields
():
boolean
{
let
b
=
this
.
getTableData
().
some
((
v
)
=>
Number
(
v
.
deliveryCount
)
<
Number
(
v
.
purchaseCount
))
let
b
=
this
.
getTableData
().
map
(
v
=>
{
return
{
...
v
,
deliveryCount
:
v
.
deliveryCount
?
v
.
deliveryCount
:
v
.
purchaseCount
}
}).
some
((
v
)
=>
{
return
Number
(
v
.
deliveryCount
)
<
Number
(
v
.
purchaseCount
)
})
if
(
b
)
{
message
.
error
(
'收货数量不能少于送货数量'
)
}
...
...
@@ -171,8 +180,8 @@ export class DeliveryNoteAddService extends HandleFormSubmit {
values
.
receiveVO
.
consignee
=
values
.
receiveVO
.
shipperName
values
.
deliveryVO
.
consignee
=
values
.
deliveryVO
.
receiverName
values
.
logisticsCompanyId
=
values
?.
logisticsCompanyInt
?.
value
??
''
values
.
logisticsCompany
=
values
?.
logisticsCompanyInt
?.
label
??
''
values
.
logisticsCompanyId
=
values
?.
logisticsCompanyInt
?.
value
??
''
values
.
logisticsCompany
=
values
?.
logisticsCompanyInt
?.
label
??
''
values
.
sendTime
=
moment
(
values
.
sendTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
var
params
=
this
.
handleBeforeRequestParamas
(
values
,
{
...
...
@@ -184,6 +193,7 @@ export class DeliveryNoteAddService extends HandleFormSubmit {
}
})
});
console
.
log
(
params
);
return
this
.
getSubmitRequest
()(
params
)
})
}
...
...
@@ -209,4 +219,24 @@ export class ReceivingNoteB2BAddService extends DeliveryNoteAddService {
}
export
class
DeliveryNoteB2bUploadService
extends
DeliveryNoteUploadService
{
}
export
class
ReceiveOrderCreate
extends
DeliveryNoteAddService
{
handleBeforeRequestParamas
(...
arg
)
{
return
{
...
arg
[
0
],
receiveTime
:
arg
[
0
].
deliveryTime
+
" "
+
arg
[
0
].
deliveryEndTime
,
products
:
arg
[
1
].
products
.
map
(
v
=>
{
return
{
deliveryOrderProductId
:
v
.
id
,
receiveCount
:
v
.
deliveryCount
}
})
}
}
getSubmitRequest
():
(
vals
:
any
)
=>
Promise
<
any
>
{
return
postOrderReceiveOrderCreate
}
}
\ No newline at end of file
src/pages/order/deliveryNotice/receivingNoteQuery/details.tsx
View file @
25d27061
...
...
@@ -4,74 +4,124 @@
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import
AnchorPage
,
{
AnchorsItem
}
from
'@/components/AnchorPage'
import
React
,
{
useState
}
from
'react'
import
{
BillsInfo
,
ConsigneeLabel
,
ConsigneePhoneLabel
,
ConsigneeTimeLabel
,
DeliveryAbstractLabel
,
DeliveryAddrLabel
,
DeliveryDateLabel
,
DeliveryGood
,
DeliveryInfo
,
DeliveryNameLabel
,
DeliveryNoLabel
,
DeliveryPhoneLabel
,
DeliverySlefAddrLabel
,
DeliveryTimeLabel
,
DeliveryTypeLabel
,
Distribution
,
LogisticsCarNoLabel
,
LogisticsCompanyLabel
,
LogisticsInfo
,
LogisticsNoLabel
,
NoteLabel
,
OutStatusLabel
}
from
'../../constants'
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
BillsInfo
,
ConsigneeTimeLabel
,
DeliveryAbstractLabel
,
DeliveryAddrLabel
,
DeliveryDateLabel
,
DeliveryGood
,
DeliveryInfo
,
DeliveryNameLabel
,
DeliveryNoLabel
,
DeliveryPhoneLabel
,
DeliverySlefAddrLabel
,
DeliveryTimeLabel
,
DeliveryTypeLabel
,
Distribution
,
ExternalRoamRecord
,
LogisticsCarNoLabel
,
LogisticsCompanyLabel
,
LogisticsInfo
,
LogisticsNoLabel
,
NoteLabel
,
OutStatusLabel
}
from
'../../constants'
import
{
BaseInfo
as
ContentBox
}
from
'@/components/BaseInfo'
import
{
Table
}
from
'antd'
;
import
{
DeliveryNoticeTableColumn
}
from
'../../constants/page-table-column'
;
import
{
DeliveryNoticeTableColumn
,
ExternalRoamRecordTableColumn
}
from
'../../constants/page-table-column'
;
import
{
useLocation
}
from
'umi'
;
import
NoteFactoryService
from
'../../assets/handles/DeliveryNoteService'
;
const
ContentBoxItem
=
ContentBox
.
BaseInfoItem
;
const
DeliveryNoticeManageSRMDetails
:
React
.
FC
=
()
=>
{
const
location
=
useLocation
();
const
query
=
(
location
as
any
).
query
;
const
service
=
NoteFactoryService
.
getInstance
(
'receive'
);
const
[
anchors
,
setAnchors
]
=
useState
<
AnchorsItem
[]
>
([
BillsInfo
,
Distribution
,
DeliveryInfo
,
LogisticsInfo
,
DeliveryGood
,
ExternalRoamRecord
])
const
[
info
,
setInfo
]
=
useState
<
any
>
();
const
[
tableDataSource
,
setTableDataSource
]
=
useState
([]);
const
[
totalCount
,
setTotalCount
]
=
useState
(
1
);
const
[
outerHistoryList
,
setOuterHistoryList
]
=
useState
([]);
useEffect
(()
=>
{
service
.
getDetailInfoById
(
query
.
id
as
string
).
then
(
res
=>
{
setInfo
(
res
)
})
service
.
getDetailInfoProductById
(
query
.
id
as
string
).
then
(
res
=>
{
setTableDataSource
(
res
.
data
)
setTotalCount
(
res
.
totalCount
)
})
},
[])
/**
* 如果info 更新 outerHistoryList也一起更新
*/
useEffect
(()
=>
{
setOuterHistoryList
(
info
?.
outerHistoryList
)
},
[
info
])
return
(
<
AnchorPage
title=
"
送货单管理详情(B2B)
"
<
AnchorPage
title=
"
收货单详情
"
anchors=
{
anchors
}
>
<
ContentBox
title=
{
BillsInfo
.
name
}
id=
{
BillsInfo
.
key
}
>
<
ContentBoxItem
label=
{
DeliveryNoLabel
}
>
{
info
?.
deliveryNo
}
</
ContentBoxItem
>
<
ContentBoxItem
label=
{
DeliveryAbstractLabel
}
>
{
info
?.
digest
}
</
ContentBoxItem
>
<
ContentBoxItem
label=
{
NoteLabel
}
>
{
info
?.
remark
}
</
ContentBoxItem
>
<
ContentBoxItem
label=
{
OutStatusLabel
}
>
{
info
?.
outerStatusName
}
</
ContentBoxItem
>
</
ContentBox
>
<
ContentBox
title=
{
Distribution
.
name
}
id=
{
Distribution
.
key
}
>
<
ContentBoxItem
label=
{
DeliveryDateLabel
}
>
{
info
?.
deliveryTime
}
</
ContentBoxItem
>
<
ContentBoxItem
label=
{
DeliveryNameLabel
}
>
{
info
?.
deliverVO
?.
consignee
}
</
ContentBoxItem
>
<
ContentBoxItem
label=
{
DeliveryTimeLabel
}
>
{
info
?.
sendTime
}
</
ContentBoxItem
>
<
ContentBoxItem
label=
{
DeliveryPhoneLabel
}
>
{
info
?.
deliverVO
?.
phone
}
</
ContentBoxItem
>
</
ContentBox
>
<
ContentBox
title=
{
DeliveryInfo
.
name
}
id=
{
DeliveryInfo
.
key
}
>
<
ContentBoxItem
label=
{
ConsigneeTimeLabel
}
>
</
ContentBoxItem
>
<
ContentBoxItem
label=
{
DeliveryAddrLabel
}
>
{
info
?.
deliveryTime
}
{
info
?.
deliveryStartTime
}
{
info
?.
deliveryEndTime
}
</
ContentBoxItem
>
<
ContentBoxItem
label=
{
DeliverySlefAddrLabel
}
>
<
ContentBoxItem
label=
{
info
?.
deliveryType
===
0
?
DeliveryAddrLabel
:
DeliverySlefAddrLabel
}
>
<
div
>
{
info
?.
deliverVO
?.
provinceName
}
{
info
?.
deliverVO
?.
cityName
}
{
info
?.
deliverVO
?.
districtName
}
{
info
?.
deliverVO
?.
streetName
}
{
info
?.
deliverVO
?.
address
}
</
div
>
<
div
>
{
info
?.
deliverVO
.
phone
}
{
info
?.
deliverVO
.
consignee
}
</
div
>
</
ContentBoxItem
>
...
...
@@ -80,26 +130,40 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<
ContentBox
title=
{
LogisticsInfo
.
name
}
id=
{
LogisticsInfo
.
key
}
>
<
ContentBoxItem
label=
{
DeliveryTypeLabel
}
>
{
service
.
getDeliveryType
(
info
?.
deliveryType
)
}
</
ContentBoxItem
>
<
ContentBoxItem
label=
{
LogisticsCarNoLabel
}
>
{
info
?.
executorVO
?.
carNumbers
}
</
ContentBoxItem
>
<
ContentBoxItem
label=
{
LogisticsCompanyLabel
}
>
{
info
?.
logisticsCompany
}
</
ContentBoxItem
>
<
ContentBoxItem
label=
{
LogisticsNoLabel
}
>
{
info
?.
logisticsNo
}
</
ContentBoxItem
>
</
ContentBox
>
<
ContentBox
title=
{
DeliveryGood
.
name
}
id=
{
DeliveryGood
.
key
}
cols=
{
1
}
>
<
Table
columns=
{
DeliveryNoticeTableColumn
}
/>
<
Table
columns=
{
DeliveryNoticeTableColumn
}
rowKey=
"id"
dataSource=
{
tableDataSource
}
pagination=
{
{
total
:
totalCount
}
}
/>
</
ContentBox
>
<
ContentBox
title=
{
ExternalRoamRecord
.
name
}
id=
{
ExternalRoamRecord
.
key
}
cols=
{
1
}
>
<
Table
columns=
{
ExternalRoamRecordTableColumn
}
rowKey=
"id"
dataSource=
{
outerHistoryList
}
/>
</
ContentBox
>
</
AnchorPage
>
)
...
...
src/pages/order/deliveryNotice/receivingNoteQuery/index.tsx
View file @
25d27061
...
...
@@ -3,33 +3,23 @@
* @author: Gavin
* @description:
*/
import
React
,
{
useRef
,
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
Space
,
Tag
}
from
'antd'
import
StandardTable
from
'@/components/StandardTable'
import
{
ColumnType
}
from
'antd/lib/table'
import
TableOperation
from
'@/components/TableOperation'
import
EyePreview
from
'@/components/EyePreview'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
receivingNoteQuerySchema
}
from
'./schema'
import
React
,
{
useRef
,
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
Space
,
Tag
}
from
'antd'
import
StandardTable
from
'@/components/StandardTable'
import
{
ColumnType
}
from
'antd/lib/table'
import
TableOperation
from
'@/components/TableOperation'
import
EyePreview
from
'@/components/EyePreview'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
receivingNoteQuerySchema
}
from
'./schema'
import
{
TagStatusFactory
}
from
'../../utils'
import
NoteFactoryService
from
'../../assets/handles/DeliveryNoteService'
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
tagStatus
=
TagStatusFactory
.
getInstance
();
const
service
=
NoteFactoryService
.
getInstance
(
"receive"
);
const
ReceivingNoteQuery
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
...
...
@@ -54,29 +44,32 @@ const ReceivingNoteQuery: React.FC = () => {
/>
)
}
const
columns
:
ColumnType
<
unknown
>
[]
=
[
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'收货单号'
,
dataIndex
:
'
id
'
,
key
:
'
id
'
,
dataIndex
:
'
receiveNo
'
,
key
:
'
receiveNo
'
,
width
:
160
,
render
:
(
t
ext
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/deliveryNotice/receivingNoteQuery/details'
>
{
text
}
</
EyePreview
>
render
:
(
t
,
r
)
=>
<
EyePreview
url=
{
`/memberCenter/order/deliveryNotice/receivingNoteQuery/details?id=${r.id}`
}
>
{
r
.
receiveNo
}
</
EyePreview
>
},
{
title
:
'收货单摘要'
,
dataIndex
:
'
id2'
,
key
:
'id2
'
},
{
title
:
'收货日期'
,
dataIndex
:
'
id3'
,
key
:
'id3
'
},
{
title
:
'送货单号'
,
dataIndex
:
'
id3'
,
key
:
'id3
'
},
{
title
:
'送货日期'
,
dataIndex
:
'
id3'
,
key
:
'id3
'
},
{
title
:
'采购会员'
,
dataIndex
:
'
id5'
,
key
:
'id5
'
},
{
title
:
'单据时间'
,
dataIndex
:
'
id4'
,
key
:
'id4
'
},
{
title
:
'收货单摘要'
,
dataIndex
:
'
digest'
,
key
:
'digest
'
},
{
title
:
'收货日期'
,
dataIndex
:
'
receiveTime'
,
key
:
'receiveTime
'
},
{
title
:
'送货单号'
,
dataIndex
:
'
deliveryNo'
,
key
:
'deliveryNo
'
},
{
title
:
'送货日期'
,
dataIndex
:
'
deliveryTime'
,
key
:
'deliveryTime
'
},
{
title
:
'采购会员'
,
dataIndex
:
'
vendorMemberName'
,
key
:
'vendorMemberName
'
},
{
title
:
'单据时间'
,
dataIndex
:
'
createTime'
,
key
:
'createTime
'
},
{
title
:
'外部状态'
,
dataIndex
:
'id6'
,
key
:
'id6'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
<
Tag
color=
{
tagStatusColor
[
record
.
id
]?.
color
}
>
<
span
style=
{
{
color
:
tagStatusColor
[
record
.
id
]?.
fontColor
}
}
>
{
text
}
</
span
>
</
Tag
>
)
dataIndex
:
'outerStatusName'
,
key
:
'outerStatusName'
,
render
:
(
text
:
string
,
record
:
any
)
=>
{
const
styles
=
tagStatus
.
getTagStyle
(
record
.
id
)
return
(
<
Tag
color=
{
styles
.
bgColor
}
>
<
span
style=
{
{
color
:
styles
.
fontColor
}
}
>
{
styles
.
txt
}
</
span
>
</
Tag
>
)
}
},
{
title
:
'操作'
,
...
...
@@ -88,22 +81,7 @@ const ReceivingNoteQuery: React.FC = () => {
]
const
fetchData
=
(
params
:
unknown
)
=>
{
console
.
log
(
'params :>> '
,
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
service
.
getQuery
(
params
)
}
return
(
...
...
src/pages/order/receivingNote/deliveryNoteManage/add.tsx
View file @
25d27061
This diff is collapsed.
Click to expand it.
src/pages/order/receivingNote/deliveryNoteManage/index.tsx
View file @
25d27061
...
...
@@ -35,7 +35,7 @@ const DeliveryNoteManage: React.FC = () => {
}
const
buttonGroup
=
{
'修改'
:
true
,
'作废'
:
tru
e
,
'作废'
:
fals
e
,
'查看'
:
true
,
}
const
operationHandler
=
{
...
...
@@ -51,13 +51,16 @@ const DeliveryNoteManage: React.FC = () => {
/>
)
}
const
columns
:
ColumnType
<
unknown
>
[]
=
[
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'收货单号'
,
dataIndex
:
'id'
,
key
:
'id'
,
width
:
160
,
render
:
(
text
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/receivingNote/deliveryNoteManage/details'
>
{
text
}
</
EyePreview
>
render
:
(
text
,
record
)
=>
<
EyePreview
url=
'/memberCenter/order/receivingNote/deliveryNoteManage/details'
>
{
text
}
</
EyePreview
>
},
{
title
:
'收货单摘要'
,
dataIndex
:
'digest'
,
key
:
'digest'
},
{
title
:
'送货单号'
,
dataIndex
:
'deliveryNo'
,
key
:
'deliveryNo'
},
...
...
src/pages/order/receivingNote/deliveryNoteQuery/index.tsx
View file @
25d27061
...
...
@@ -17,30 +17,19 @@ import { FORM_FILTER_PATH } from '@/formSchema/const'
import
{
deliveryNoteQuerySchema
}
from
'./schema'
import
ReceiveNoteFacotry
from
'../../assets/handles/ReceiveNotePage'
import
{
TagStatusFactory
}
from
'../../utils'
import
{
useHistory
}
from
'umi'
interface
IStatusEnum
{
[
key
:
number
]:
{
color
:
string
,
fontColor
:
string
}
}
enum
StatusEnum
{
ToSbumit
=
2
}
const
service
=
ReceiveNoteFacotry
.
getInstance
(
'Query'
)
const
tagStatus
=
TagStatusFactory
.
getInstance
();
const
DeliveryNoteQuery
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
formActions
=
createFormActions
()
const
service
=
ReceiveNoteFacotry
.
getInstance
(
'Query'
)
const
tagStatus
=
TagStatusFactory
.
getInstance
();
const
history
=
useHistory
()
const
controllerBtns
=
(<
Space
></
Space
>)
const
renderOptionButton
=
(
r
ecord
:
any
)
=>
{
const
renderOptionButton
=
(
r
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'生产收货单'
:
'DevTest'
,
'查看'
:
'DevTest'
,
...
...
@@ -50,7 +39,9 @@ const DeliveryNoteQuery: React.FC = () => {
'查看'
:
true
,
}
const
operationHandler
=
{
'生产收货单'
:
()
=>
{
console
.
log
(
'生产收货单 :>> '
,)
},
'生产收货单'
:
()
=>
{
history
.
push
(
`/memberCenter/order/receivingNote/deliveryNoteManage/add?id=
${
r
.
id
}
`
)
},
'查看'
:
()
=>
{
console
.
log
(
'查看 :>> '
,)
},
}
return
(
...
...
@@ -61,13 +52,13 @@ const DeliveryNoteQuery: React.FC = () => {
/>
)
}
const
columns
:
ColumnType
<
unknown
>
[]
=
[
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'收货单号'
,
dataIndex
:
'id'
,
key
:
'id'
,
width
:
160
,
render
:
(
t
ext
:
unknown
,
record
:
unknown
)
=>
<
EyePreview
url=
'/memberCenter/order/receivingNote/deliveryNoteQuery/details'
>
{
text
}
</
EyePreview
>
render
:
(
t
:
any
,
r
:
any
)
=>
<
EyePreview
url=
{
`/memberCenter/order/receivingNote/deliveryNoteQuery/details?id=${r.id}`
}
>
{
r
.
deliveryNo
}
</
EyePreview
>
},
{
title
:
'收货单摘要'
,
dataIndex
:
'digest'
,
key
:
'digest'
},
{
title
:
'收货日期'
,
dataIndex
:
'receiveTime'
,
key
:
'receiveTime'
},
...
...
@@ -82,7 +73,7 @@ const DeliveryNoteQuery: React.FC = () => {
const
styles
=
tagStatus
.
getTagStyle
(
record
.
outerStatus
)
return
(
<
Tag
color=
{
styles
.
bgColor
}
>
<
span
style=
{
{
color
:
styles
.
fontColor
}
}
>
{
record
.
outerStatus
}
</
span
>
<
span
style=
{
{
color
:
styles
.
fontColor
}
}
>
{
styles
.
txt
}
</
span
>
</
Tag
>
)
}
...
...
@@ -97,7 +88,7 @@ const DeliveryNoteQuery: React.FC = () => {
]
const
fetchData
=
(
params
:
unknown
)
=>
{
return
service
.
getQuery
(
params
)
.
then
(
res
=>
res
.
data
)
return
service
.
getQuery
(
params
)
}
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