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
5acef646
Commit
5acef646
authored
Dec 16, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加手工发货、手工收货
parent
95bacda4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
42 deletions
+72
-42
formEffects.tsx
src/pages/handling/assign/add/formEffects.tsx
+0
-0
index.tsx
src/pages/handling/assign/add/index.tsx
+0
-2
schema.tsx
src/pages/handling/assign/add/schema.tsx
+12
-15
index.tsx
src/pages/handling/assign/detail/index.tsx
+34
-2
index.tsx
src/pages/handling/components/DeliverGood/index.tsx
+26
-23
No files found.
src/pages/handling/assign/add/formEffects.tsx
0 → 100644
View file @
5acef646
src/pages/handling/assign/add/index.tsx
View file @
5acef646
...
...
@@ -14,7 +14,6 @@ import ProcessOrder from '../../components/ProcessOrder';
import
{
WrapUploadFile
}
from
'../../components/UploadFile'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
ProcessDetail
from
'../../components/ProcessDetail'
;
// import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import
{
useRowSelection
}
from
'../../common/useRowSelection'
;
import
{
getAuth
}
from
'@/utils/auth'
;
import
{
ENTERPRISE_MALL
}
from
'../../common'
;
...
...
@@ -139,7 +138,6 @@ const Add: React.FC<{}> = () => {
}
},
[
id
])
const
noticesDetailColumn
=
()
=>
{
const
blackList
=
[
"orderNo"
,
"orderTotal"
,
"restTotal"
];
const
tempColumns
=
[
...
...
src/pages/handling/assign/add/schema.tsx
View file @
5acef646
...
...
@@ -77,23 +77,20 @@ const basicTab = {
display
:
false
,
},
source
:
{
type
:
'
object
'
,
type
:
'
radio
'
,
title
:
'通知单来源'
,
required
:
true
,
"x-component"
:
'Radio'
,
"x-component-props"
:
{
options
:
[
{
label
:
'订单加工'
,
value
:
1
},
{
label
:
'商品加工'
,
value
:
2
}
],
default
:
1
}
enum
:
[
{
label
:
'订单加工'
,
value
:
1
},
{
label
:
'商品加工'
,
value
:
2
}
],
default
:
1
},
deliveryDate
:
{
...
...
src/pages/handling/assign/detail/index.tsx
View file @
5acef646
...
...
@@ -297,6 +297,20 @@ const Detail: React.FC<{}> = () => {
}
})
}
/**
* 手工收货
*/
const
handleManualReceiver
=
()
=>
{
const
postData
=
{
id
:
id
,
}
PublicApi
.
postEnhanceSupplierToBeReceiveManualReceive
(
postData
)
.
then
(({
data
,
code
})
=>
{
if
(
code
===
1000
)
{
getInfo
()
}
})
}
return
(
<
PageHeaderWrapper
...
...
@@ -347,7 +361,7 @@ const Detail: React.FC<{}> = () => {
}
{
// 这里手工发货需要某个字段值去判断
pathname
===
(
PENDING_DELIVERD_PATH
+
"/detail"
)
&&
info
&&
info
.
outer
Status
===
29
pathname
===
(
PENDING_DELIVERD_PATH
+
"/detail"
)
&&
info
&&
info
.
outer
TaskType
===
29
&&
info
.
innerStatus
<
21
?
(
<
DeliverGood
mode=
"edit"
handleManualDeliver=
{
handleManualDeliver
}
deliveryType=
{
info
.
deliveryType
}
>
<
Button
loading=
{
loading
}
type=
"primary"
>
手工发货
</
Button
>
...
...
@@ -355,6 +369,24 @@ const Detail: React.FC<{}> = () => {
)
:
null
}
{
// 手工收货
pathname
===
(
ASSIGN_PENDING_RECEIVE_DETAIL
)
&&
info
&&
info
.
outerTaskType
===
29
&&
info
.
innerStatus
==
21
?
(
<
DeliverGood
mode=
"view"
deliveryType=
{
info
.
deliveryType
}
deliveryAddress=
{
info
.
manualDeliverBO
?.
deliveryAddress
}
deliveryTime=
{
info
.
manualDeliverBO
?.
deliveryTime
}
deliveryNo=
{
info
.
manualDeliverBO
?.
deliveryNo
}
logisticsName=
{
info
.
manualDeliverBO
?.
logisticsName
}
handleManualReceiver=
{
handleManualReceiver
}
>
<
Button
type=
"primary"
>
确认手工收货
</
Button
>
</
DeliverGood
>
)
:
null
}
</
Col
>
</
Row
>
</
PageHeader
>
...
...
@@ -374,7 +406,7 @@ const Detail: React.FC<{}> = () => {
{
/* 这里全部是走 非手工发货,当有手工发货按钮是,此时下面收发货明细隐藏 */
}
{
info
&&
info
.
outer
Status
===
26
info
&&
info
.
outer
TaskType
!==
29
?
<
div
style=
{
{
marginTop
:
'20px'
}
}
>
<
ReceiptDeliveryDetailsCard
>
<
StatisticsTab
tab=
"收发货统计"
columns=
{
receiveColumns
(
info
.
source
===
2
?
'product'
:
'order'
)
}
dataSource=
{
info
.
details
}
></
StatisticsTab
>
...
...
src/pages/handling/components/DeliverGood/index.tsx
View file @
5acef646
...
...
@@ -5,15 +5,18 @@ import { createAsyncFormActions, FormEffectHooks } from '@formily/antd';
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
styles
from
'./index.less'
;
import
{
Link
}
from
'umi'
const
formActions
=
createAsyncFormActions
();
const
{
onFieldValueChange$
,
onFieldMount$
}
=
FormEffectHooks
interface
Iprops
{
children
:
React
.
ReactNode
,
mode
:
'view'
|
'edit'
,
handleManualDeliver
?:
(
value
:
any
)
=>
void
deliveryType
:
1
|
2
handleManualReceiver
?:
()
=>
void
deliveryType
:
1
|
2
,
deliveryAddress
?:
string
,
deliveryTime
?:
string
deliveryNo
?:
string
logisticsName
?:
string
}
const
getSchema
=
(
type
)
=>
{
...
...
@@ -101,9 +104,11 @@ const DeliverGood: React.FC<Iprops> = (props) => {
const
handleOk
=
()
=>
{
if
(
mode
===
'edit'
)
{
formActions
.
submit
()
}
else
{
setVisible
(
false
);
props
.
handleManualReceiver
()
}
}
const
handleCancel
=
()
=>
{
setVisible
(
false
);
}
...
...
@@ -135,21 +140,13 @@ const DeliverGood: React.FC<Iprops> = (props) => {
return
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
id
value
:
item
.
name
}
})
}
return
[]
},
[])
const
effects
=
()
=>
{
console
.
log
(
123
);
onFieldValueChange$
(
'logisticsName'
).
subscribe
((
fieldState
)
=>
{
// console.log(fieldState);
// formActions.setFieldValue()
})
}
return
(
<
div
>
<
div
onClick=
{
()
=>
setVisible
(
true
)
}
>
...
...
@@ -179,20 +176,26 @@ const DeliverGood: React.FC<Iprops> = (props) => {
:
<
div
>
<
Row
className=
{
styles
.
row
}
>
<
Col
className=
{
styles
.
label
}
span=
{
4
}
>
发货地址:
</
Col
>
<
Col
>
广东省广州市海珠区新港东路1068号中州中心北塔6楼
</
Col
>
<
Col
>
{
props
.
deliveryAddress
}
</
Col
>
</
Row
>
<
Row
className=
{
styles
.
row
}
>
<
Col
className=
{
styles
.
label
}
span=
{
4
}
>
发货时间:
</
Col
>
<
Col
>
2020-05-20 08:00
</
Col
>
</
Row
>
<
Row
className=
{
styles
.
row
}
>
<
Col
className=
{
styles
.
label
}
span=
{
4
}
>
物流单号:
</
Col
>
<
Col
><
Link
to=
{
'/'
}
>
WL0954548
</
Link
></
Col
>
</
Row
>
<
Row
className=
{
styles
.
row
}
>
<
Col
className=
{
styles
.
label
}
span=
{
4
}
>
物流公司:
</
Col
>
<
Col
>
顺丰
</
Col
>
<
Col
>
{
props
.
deliveryTime
}
</
Col
>
</
Row
>
{
props
.
deliveryType
===
1
?
<>
<
Row
className=
{
styles
.
row
}
>
<
Col
className=
{
styles
.
label
}
span=
{
4
}
>
物流单号:
</
Col
>
<
Col
><
a
href=
"https://www.kuaidi100.com/"
>
{
props
.
deliveryNo
}
</
a
></
Col
>
</
Row
>
<
Row
className=
{
styles
.
row
}
>
<
Col
className=
{
styles
.
label
}
span=
{
4
}
>
物流公司:
</
Col
>
<
Col
>
{
props
.
logisticsName
}
</
Col
>
</
Row
>
</>
:
null
}
</
div
>
}
</
Modal
>
...
...
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