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
linweijiong
jinfa-platform
Commits
b3b3aa22
Commit
b3b3aa22
authored
Aug 16, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增查看退货发货单详情相关
parent
3c4ab0a7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
126 additions
and
25 deletions
+126
-25
returnRoute.ts
config/routes/afterServiceRoute/returnRoute.ts
+8
-0
menu.ts
src/locales/zh-CN/menu.ts
+1
-0
deliverBillDetail.tsx
...eturnApplication/returnPrAddDeliver/deliverBillDetail.tsx
+63
-0
index.tsx
...terService/returnApplication/returnPrAddDeliver/index.tsx
+7
-7
index.ts
...llStorage/bills/components/BillsFormPage/effects/index.ts
+16
-6
useBusinessEffects.ts
...ls/components/BillsFormPage/effects/useBusinessEffects.ts
+2
-2
index.tsx
...stockSellStorage/bills/components/BillsFormPage/index.tsx
+12
-9
interface.ts
...ckSellStorage/bills/components/BillsFormPage/interface.ts
+17
-1
No files found.
config/routes/afterServiceRoute/returnRoute.ts
View file @
b3b3aa22
...
...
@@ -94,6 +94,14 @@ const route: RouterChild = {
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待新增退货发货单-退货发货单详情
{
path
:
'/memberCenter/afterService/returnApplication/returnPrAddDeliver/deliverDetail'
,
name
:
'returnDeliverBillDetail'
,
component
:
'@/pages/afterService/returnApplication/returnPrAddDeliver/deliverBillDetail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待新增退货发货单-订单详情
{
path
:
'/memberCenter/afterService/returnApplication/returnPrAddDeliver/orderDetail'
,
...
...
src/locales/zh-CN/menu.ts
View file @
b3b3aa22
...
...
@@ -592,6 +592,7 @@ export default {
'menu.afterService.returnApplication.editReturnPrSubmit'
:
'编辑退货申请单'
,
'menu.afterService.returnApplication.returnPrAddDeliver'
:
'待新增退货发货单'
,
'menu.afterService.returnApplication.returnAddDeliverBill'
:
'新增退货发货单'
,
'menu.afterService.returnApplication.returnDeliverBillDetail'
:
'查看退货发货单'
,
'menu.afterService.returnApplication.returnPrAddLogistics'
:
'待新增物流单'
,
'menu.afterService.returnApplication.returnPrDeliver'
:
'待退货发货'
,
'menu.afterService.returnApplication.verifyReturnPrDeliver'
:
'退货发货'
,
...
...
src/pages/afterService/returnApplication/returnPrAddDeliver/deliverBillDetail.tsx
0 → 100644
View file @
b3b3aa22
/*
* @Author: XieZhiXiong
* @Date: 2021-08-16 11:47:55
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-16 14:36:15
* @Description: 退货发货单详情
*/
import
React
from
'react'
;
import
{
DOC_TYPE_RETURN_INVOICE
}
from
'@/constants/commodity'
;
import
BillsFormPage
,
{
RelatedInfoDataType
}
from
'@/pages/transaction/stockSellStorage/bills/components/BillsFormPage'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
moment
from
'moment'
;
const
DeliverBillDetail
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
fetchRelatedInfo
=
():
Promise
<
RelatedInfoDataType
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getAsReturnGoodsGetReturnDeliveryGoodsDetail
({
returnDeliveryId
:
id
,
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
resolve
({
relatedNo
:
res
.
data
.
applyNo
,
memberName
:
res
.
data
.
memberName
,
address
:
`
${
res
.
data
.
userName
||
''
}
/
${
res
.
data
.
tel
||
''
}
${
res
.
data
.
address
||
''
}
`
,
logisticsType
:
res
.
data
.
deliveryType
,
inventoryId
:
res
.
data
.
inventoryName
,
inventoryRole
:
res
.
data
.
inventoryRole
,
digest
:
res
.
data
.
orderAbstract
,
createTime
:
res
.
data
.
orderTime
?
moment
(
res
.
data
.
orderTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
billDetails
:
res
.
data
.
goodsDetailDeliveryList
.
map
((
item
)
=>
({
orderNo
:
item
.
orderNo
,
productId
:
item
.
productId
,
productName
:
item
.
productName
,
category
:
item
.
category
,
brand
:
item
.
brand
,
unit
:
item
.
category
,
price
:
item
.
purchasePrice
,
relatedCount
:
item
.
returnCount
,
})),
});
}
reject
();
}).
catch
((
err
)
=>
{
reject
(
err
);
});
});
};
return
(
<>
<
BillsFormPage
billType=
{
DOC_TYPE_RETURN_INVOICE
}
fetchRelatedInfo=
{
fetchRelatedInfo
}
editable=
{
false
}
/>
</>
);
};
export
default
DeliverBillDetail
;
src/pages/afterService/returnApplication/returnPrAddDeliver/index.tsx
View file @
b3b3aa22
...
...
@@ -107,13 +107,13 @@ const ReturnPrAddDeliver: React.FC = () => {
title
:
'退货发货单号'
,
dataIndex
:
'returnDeliveryNo'
,
align
:
'center'
,
//
render: (text, record) => (
//
<Link
// to={`/memberCenter/tranactionAbility/stockSellStorage/bills/d
etail?id=${record.returnDeliveryId}`}
//
>
//
{text}
//
</Link>
//
),
render
:
(
text
,
record
)
=>
(
<
Link
to=
{
`/memberCenter/afterService/returnApplication/returnPrAddDeliver/deliverD
etail?id=${record.returnDeliveryId}`
}
>
{
text
}
</
Link
>
),
},
{
title
:
'外部状态'
,
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsFormPage/effects/index.ts
View file @
b3b3aa22
...
...
@@ -2,10 +2,15 @@
* @Author: XieZhiXiong
* @Date: 2021-08-04 14:42:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-
04 17:59:35
* @LastEditTime: 2021-08-
16 14:47:41
* @Description:
*/
import
{
FormPath
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
FormEffectHooks
,
IFormExtendsEffectSelector
,
ISchemaFormActions
,
ISchemaFormAsyncActions
,
}
from
'@formily/antd'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useBusinessEffects
}
from
'./useBusinessEffects'
;
...
...
@@ -42,11 +47,15 @@ const fetchInventory = (): Promise<any[]> => {
});
};
export
const
createEffects
=
(
context
,
a
ctions
)
=>
{
const
{
setFieldState
}
=
actions
;
export
const
createEffects
=
(
context
:
IFormExtendsEffectSelector
,
actions
:
ISchemaFormActions
|
ISchemaFormAsyncA
ctions
)
=>
{
const
editable
=
actions
.
getFormState
((
formState
)
=>
formState
.
editable
)
useBusinessEffects
(
context
,
actions
);
useAsyncSelect
(
'billType'
,
fetchInvoicesType
,
[
'name'
,
'id'
]);
useAsyncSelect
(
'inventoryId'
,
fetchInventory
,
[
'name'
,
'id'
]);
useAsyncSelect
(
'billType'
,
fetchInvoicesType
,
[
'name'
,
'id'
]);
// 不可编辑状态不请求
if
(
editable
)
{
useAsyncSelect
(
'inventoryId'
,
fetchInventory
,
[
'name'
,
'id'
]);
}
};
\ No newline at end of file
src/pages/transaction/stockSellStorage/bills/components/BillsFormPage/effects/useBusinessEffects.ts
View file @
b3b3aa22
...
...
@@ -5,7 +5,7 @@
* @LastEditTime: 2021-08-12 17:08:09
* @Description:
*/
import
{
FormEffectHooks
,
FormPath
,
I
FormActions
}
from
'@formily/antd'
;
import
{
FormEffectHooks
,
FormPath
,
I
SchemaFormActions
,
ISchemaFormAsyncActions
,
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
const
{
...
...
@@ -13,7 +13,7 @@ const {
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
:
I
Form
Actions
)
=>
{
export
const
useBusinessEffects
=
(
context
,
actions
:
I
SchemaFormActions
|
ISchemaFormAsync
Actions
)
=>
{
const
{
getFieldValue
,
setFieldState
,
setFieldValue
,
getFieldState
}
=
actions
;
const
linkage
=
useLinkageUtils
();
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsFormPage/index.tsx
View file @
b3b3aa22
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-04 11:33:33
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-1
2 17:52:48
* @LastEditTime: 2021-08-1
6 14:52:30
* @Description: 单据表单组件,提供基础的表单内容,单据明细相关由外部传入控制
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
...
...
@@ -95,7 +95,6 @@ const BillsFormPage: React.FC<IProps> = (props: IProps) => {
if
(
fetchRelatedInfo
)
{
setRelatedLoading
(
true
);
fetchRelatedInfo
().
then
((
res
)
=>
{
console
.
log
(
'res'
,
res
)
if
(
res
)
{
setRelatedInfo
({
...
res
,
...
...
@@ -134,13 +133,17 @@ const BillsFormPage: React.FC<IProps> = (props: IProps) => {
title=
{
`${editable ? '新增' : '查看'}${TITLE_MAP[billType]}`
}
anchors=
{
anchorsArr
}
extra=
{
(
<
Button
type=
"primary"
loading=
{
!!
submitLoading
}
onClick=
{
()
=>
formActions
.
submit
()
}
>
保存
</
Button
>
<>
{
editable
?
(
<
Button
type=
"primary"
loading=
{
!!
submitLoading
}
onClick=
{
()
=>
formActions
.
submit
()
}
>
保存
</
Button
>
)
:
null
}
</>
)
}
>
<
NiceForm
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsFormPage/interface.ts
View file @
b3b3aa22
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-12 16:39:50
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-1
2 17:49:41
* @LastEditTime: 2021-08-1
6 14:33:28
* @Description:
*/
export
type
BillDetailsItemType
=
{
...
...
@@ -72,6 +72,22 @@ export type RelatedInfoDataType = {
* 单据明细数据
*/
billDetails
:
BillDetailsItemType
[],
/**
* 仓库id
*/
inventoryId
?:
number
|
string
,
/**
* 对应仓库名称
*/
inventoryRole
?:
string
,
/**
* 单据摘要
*/
digest
?:
string
,
/**
* 单据时间
*/
createTime
?:
string
,
}
export
type
RelatedInfoType
=
Omit
<
RelatedInfoDataType
,
'billDetails'
>
&
{
...
...
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