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
黄庭坚
jinfa-platform
Commits
f94a3eda
Commit
f94a3eda
authored
Aug 20, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加换货入库单相关
parent
ea26962a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
205 additions
and
19 deletions
+205
-19
exchangeManageRoute.ts
config/routes/afterServiceRoute/exchangeManageRoute.ts
+2
-2
exchangeRoute.ts
config/routes/afterServiceRoute/exchangeRoute.ts
+16
-0
menu.ts
src/locales/zh-CN/menu.ts
+2
-0
addWarehouseBill.tsx
...Application/exchangePrAddWarehousing/addWarehouseBill.tsx
+108
-0
index.tsx
...ce/exchangeApplication/exchangePrAddWarehousing/index.tsx
+11
-17
warehouseBillDetail.tsx
...lication/exchangePrAddWarehousing/warehouseBillDetail.tsx
+66
-0
No files found.
config/routes/afterServiceRoute/exchangeManageRoute.ts
View file @
f94a3eda
...
...
@@ -236,7 +236,7 @@ const route: RouterChild = {
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待新增
退
货发货单-新增
// 待新增
换
货发货单-新增
{
path
:
'/memberCenter/afterService/exchangeManage/exchangePrAddDeliver/add'
,
name
:
'exchangeAddDeliverBill'
,
...
...
@@ -244,7 +244,7 @@ const route: RouterChild = {
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待新增
退货发货单-退货发
货单详情
// 待新增
换货发货单-退货换
货单详情
{
path
:
'/memberCenter/afterService/exchangeManage/exchangePrAddDeliver/deliverDetail'
,
name
:
'exchangeDeliverBillDetail'
,
...
...
config/routes/afterServiceRoute/exchangeRoute.ts
View file @
f94a3eda
...
...
@@ -197,6 +197,22 @@ export default {
name
:
'exchangePrAddWarehousing'
,
component
:
'@/pages/afterService/exchangeApplication/exchangePrAddWarehousing/index'
,
},
// 待新增换货入库单-新增
{
path
:
'/memberCenter/afterService/exchangeApplication/exchangePrAddWarehousing/add'
,
name
:
'exchangeAddWarehousingBill'
,
component
:
'@/pages/afterService/exchangeApplication/exchangePrAddWarehousing/addWarehouseBill'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待新增换货入库单-换货入库单详情
{
path
:
'/memberCenter/afterService/exchangeApplication/exchangePrAddWarehousing/warehousingDetail'
,
name
:
'exchangeWarehousingBillDetail'
,
component
:
'@/pages/afterService/exchangeApplication/exchangePrAddWarehousing/warehouseBillDetail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待新增换货入库单-详情
{
path
:
'/memberCenter/afterService/exchangeApplication/exchangePrAddWarehousing/detail'
,
...
...
src/locales/zh-CN/menu.ts
View file @
f94a3eda
...
...
@@ -557,6 +557,8 @@ export default {
'menu.afterService.exchangeApplication.exchangePrConfirmBack'
:
'待确认退货回单'
,
'menu.afterService.exchangeApplication.verifyExchangePrConfirmBack'
:
'确认退货回单'
,
'menu.afterService.exchangeApplication.exchangePrAddWarehousing'
:
'待新增换货入库单'
,
'menu.afterService.exchangeApplication.exchangeAddWarehousingBill'
:
'新增换货入库单'
,
'menu.afterService.exchangeApplication.exchangeWarehousingBillDetail'
:
'查看换货入库单'
,
'menu.afterService.exchangeApplication.exchangePrReceived'
:
'待换货收货'
,
'menu.afterService.exchangeApplication.verifyExchangePrReceived'
:
'换货收货'
,
'menu.afterService.exchangeApplication.exchangePrFinished'
:
'待确认售后完成'
,
...
...
src/pages/afterService/exchangeApplication/exchangePrAddWarehousing/addWarehouseBill.tsx
0 → 100644
View file @
f94a3eda
/*
* @Author: XieZhiXiong
* @Date: 2021-08-20 15:55:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-20 15:55:10
* @Description: 新增换货入库单
*/
import
React
,
{
useState
}
from
'react'
;
import
{
FormEffectHooks
}
from
'@formily/antd'
;
import
{
history
,
Prompt
}
from
'umi'
;
import
moment
from
'moment'
;
import
{
DOC_TYPE_EXCHANGE_RECEIPT
}
from
'@/constants/commodity'
;
import
BillsFormPage
,
{
RelatedInfoDataType
,
BillSubmitValuesType
}
from
'@/pages/transaction/stockSellStorage/bills/components/BillsFormPage'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
onFormInputChange$
,
}
=
FormEffectHooks
;
const
ExchangeAddWarehouseBill
=
()
=>
{
const
{
applyId
,
deliveryId
}
=
usePageStatus
();
const
[
unsaved
,
setUnsaved
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
fetchRelatedInfo
=
():
Promise
<
RelatedInfoDataType
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getAsReplaceGoodsGetReplaceGoodsStorageDetail
({
replaceDeliveryId
:
deliveryId
,
}).
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
,
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
.
replaceCount
,
billCount
:
item
.
replaceDeliveryCount
,
count
:
item
.
replaceDeliveryCount
,
})),
});
}
reject
();
}).
catch
((
err
)
=>
{
reject
(
err
);
});
});
};
const
handleSubmit
=
(
values
:
BillSubmitValuesType
)
=>
{
PublicApi
.
postAsReplaceGoodsAddReplaceGoodsStorage
({
replaceId
:
applyId
,
storageTime
:
values
.
createTime
?
moment
(
values
.
createTime
).
valueOf
()
:
0
,
orderAbstract
:
values
.
digest
,
remark
:
values
.
remark
,
inventoryName
:
values
.
inventoryName
,
inventoryRole
:
values
.
inventoryRole
,
detailList
:
values
.
billDetails
.
map
((
item
)
=>
({
orderNo
:
item
.
orderNo
,
productId
:
item
.
productId
,
productName
:
item
.
productName
,
category
:
item
.
category
,
brand
:
item
.
brand
,
unit
:
item
.
unit
,
count
:
item
.
count
,
})),
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
setUnsaved
(
false
);
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
}
else
{
setSubmitLoading
(
false
);
}
});
};
return
(
<>
<
BillsFormPage
billType=
{
DOC_TYPE_EXCHANGE_RECEIPT
}
fetchRelatedInfo=
{
fetchRelatedInfo
}
submitLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
customEffects=
{
()
=>
{
onFormInputChange$
().
subscribe
(()
=>
{
if
(
!
unsaved
)
{
setUnsaved
(
true
);
}
});
}
}
/>
<
Prompt
when=
{
unsaved
}
message=
"您还有未保存的内容,是否确定要离开?"
/>
</>
);
};
export
default
ExchangeAddWarehouseBill
;
src/pages/afterService/exchangeApplication/exchangePrAddWarehousing/index.tsx
View file @
f94a3eda
...
...
@@ -2,13 +2,12 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 202
0-11-19 18:18:34
* @Description: 待新增换货
发货
单
* @LastEditTime: 202
1-08-20 16:08:41
* @Description: 待新增换货
入库
单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
Card
,
Badge
,
Progress
,
Button
,
Modal
}
from
'antd'
;
import
{
Card
,
Badge
,
Button
,
Modal
}
from
'antd'
;
import
{
ClockCircleOutlined
,
ExclamationCircleOutlined
,
}
from
'@ant-design/icons'
;
import
{
history
,
Link
}
from
'umi'
;
...
...
@@ -22,10 +21,6 @@ import {
EXCHANGE_INNER_STATUS_NOT_ADDED_REPLACE_STORAGE
,
EXCHANGE_INNER_STATUS_UNREVIEWED_REPLACE_STORAGE
}
from
'@/constants/afterService'
;
import
{
DOC_TYPE_EXCHANGE_RECEIPT
,
DEPENDENT_DOC_EXCHANGE
,
}
from
'@/constants/commodity'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
@@ -37,7 +32,6 @@ import {
EXCHANGE_INNER_STATUS_BADGE_MAP
,
}
from
'../../constants'
;
import
styles
from
'./index.less'
;
import
{
reject
}
from
'lodash'
;
const
{
confirm
}
=
Modal
;
...
...
@@ -50,7 +44,7 @@ const ExchangePrAddWarehousing: React.FC = () => {
confirm
({
title
:
'确认审核操作'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否确认审核换货
入库单号为
${
record
.
replaceDeliveryNo
}
的换货入库
单?`
,
content
:
`是否确认审核换货
收货单号为
${
record
.
replaceDeliveryNo
}
的换货收货
单?`
,
onOk
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
postAsReplaceGoodsVerifyReplaceGoodsStorage
({
...
...
@@ -88,12 +82,12 @@ const ExchangePrAddWarehousing: React.FC = () => {
dataIndex
:
'applyAbstract'
,
align
:
'center'
,
ellipsis
:
true
,
},
},
{
title
:
'供应会员'
,
dataIndex
:
'supplierName'
,
align
:
'center'
,
},
},
{
title
:
'单据时间'
,
dataIndex
:
'applyTime'
,
...
...
@@ -105,12 +99,12 @@ const ExchangePrAddWarehousing: React.FC = () => {
align
:
'center'
,
},
{
title
:
'换货
发
货单号'
,
dataIndex
:
'replace
Delivery
No'
,
title
:
'换货
收
货单号'
,
dataIndex
:
'replace
Storage
No'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
Link
to=
{
`/memberCenter/
tranactionAbility/stockSellStorage/bills/d
etail?id=${record.replaceDeliveryId}`
}
to=
{
`/memberCenter/
afterService/exchangeApplication/exchangePrAddWarehousing/warehousingD
etail?id=${record.replaceDeliveryId}`
}
>
{
text
}
</
Link
>
...
...
@@ -129,7 +123,7 @@ const ExchangePrAddWarehousing: React.FC = () => {
dataIndex
:
'innerStatusName'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
EXCHANGE_INNER_STATUS_BADGE_MAP
[
record
.
innerStatus
]
||
'#606266'
}
text=
{
text
}
/>,
},
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
...
...
@@ -141,7 +135,7 @@ const ExchangePrAddWarehousing: React.FC = () => {
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/
tranactionAbility/stockSellStorage/bills/add?relevanceInvoicesId=${record.replaceId}&invoicesTypeId=${DOC_TYPE_EXCHANGE_RECEIPT}&relevanceInvoices=${DEPENDENT_DOC_EXCHANGE
}`
)
history
.
push
(
`/memberCenter/
afterService/exchangeApplication/exchangePrAddWarehousing/add?applyId=${record.replaceId}&deliveryId=${record.replaceDeliveryId
}`
)
}
>
新增
...
...
src/pages/afterService/exchangeApplication/exchangePrAddWarehousing/warehouseBillDetail.tsx
0 → 100644
View file @
f94a3eda
/*
* @Author: XieZhiXiong
* @Date: 2021-08-20 15:55:17
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-20 15:55:18
* @Description: 换货入库单详情
*/
import
React
from
'react'
;
import
{
DOC_TYPE_EXCHANGE_RECEIPT
}
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
ExchangeWarehouseBillDetail
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
fetchRelatedInfo
=
():
Promise
<
RelatedInfoDataType
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getAsReplaceGoodsGetReturnGoodsStorageDetail
({
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
.
replaceCount
,
billCount
:
item
.
replaceDeliveryCount
,
count
:
item
.
storageCount
,
})),
remark
:
res
.
data
.
remark
,
});
}
reject
();
}).
catch
((
err
)
=>
{
reject
(
err
);
});
});
};
return
(
<>
<
BillsFormPage
billType=
{
DOC_TYPE_EXCHANGE_RECEIPT
}
fetchRelatedInfo=
{
fetchRelatedInfo
}
editable=
{
false
}
/>
</>
);
};
export
default
ExchangeWarehouseBillDetail
;
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