Commit 98890249 authored by XieZhiXiong's avatar XieZhiXiong

feat: 添加查看退货入库单相关

parent 6d905b7c
......@@ -163,11 +163,19 @@ const route: RouterChild = {
// 待新增退货入库单-新增
{
path: '/memberCenter/afterService/returnManage/returnPrAddWarehousing/add',
name: 'returnAddDeliverBill',
name: 'returnAddWarehousingBill',
component: '@/pages/afterService/returnManage/returnPrAddWarehousing/addWarehouseBill',
hideInMenu: true,
noMargin: true,
},
// 待新增退货入库单-退货入库单详情
{
path: '/memberCenter/afterService/returnManage/returnPrAddWarehousing/warehousingDetail',
name: 'returnWarehousingBillDetail',
component: '@/pages/afterService/returnManage/returnPrAddWarehousing/warehouseBillDetail',
hideInMenu: true,
noMargin: true,
},
// 待新增退货入库单-详情
{
path: '/memberCenter/afterService/returnManage/returnPrAddWarehousing/detail',
......
......@@ -592,6 +592,7 @@ export default {
'menu.afterService.returnApplication.editReturnPrSubmit': '编辑退货申请单',
'menu.afterService.returnApplication.returnPrAddDeliver': '待新增退货发货单',
'menu.afterService.returnApplication.returnAddDeliverBill': '新增退货发货单',
'menu.afterService.returnApplication.returnWarehousingDetail': '新增退货发货单',
'menu.afterService.returnApplication.returnDeliverBillDetail': '查看退货发货单',
'menu.afterService.returnApplication.returnPrAddLogistics': '待新增物流单',
'menu.afterService.returnApplication.returnPrDeliver': '待退货发货',
......@@ -616,6 +617,8 @@ export default {
'menu.afterService.returnManage.returnPrConfirm': '待确认退货申请单',
'menu.afterService.returnManage.verifyReturnPrConfirm': '确认退货申请单',
'menu.afterService.returnManage.returnPrAddWarehousing': '待新增退货入库单',
'menu.afterService.returnManage.returnAddWarehousingBill': '新增退货入库单',
'menu.afterService.returnManage.returnWarehousingBillDetail': '查看退货入库单',
'menu.afterService.returnManage.returnPrReceived': '待退货收货',
'menu.afterService.returnManage.verifyReturnPrReceived': '确认退货收货',
'menu.afterService.returnManage.returnPrReturn': '待退款',
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-13 18:19:27
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-13 18:34:10
* @LastEditTime: 2021-08-16 15:26:07
* @Description: 新增退货入库单
*/
import React, { useState } from 'react';
......@@ -19,23 +19,23 @@ const {
} = FormEffectHooks;
const ReturnAddWarehouseBill = () => {
const { applyId } = usePageStatus();
const { applyId, deliveryId } = usePageStatus();
const [unsaved, setUnsaved] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const fetchRelatedInfo = (): Promise<RelatedInfoDataType> => {
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsGetDetailBySupplier({
returnId: applyId,
PublicApi.getAsReturnGoodsGetReturnGoodsStorageDetail({
returnDeliveryId: deliveryId,
}).then((res) => {
if (res.code === 1000) {
resolve({
relatedNo: res.data.applyNo,
memberName: res.data.consumerName,
address: `${res.data.returnGoodsAddress?.sendUserName || ''} / ${res.data.returnGoodsAddress?.sendUserTel || ''} ${res.data.returnGoodsAddress?.sendAddress || ''}`,
logisticsType: res.data.returnGoodsAddress?.deliveryType,
billDetails: res.data.goodsDetailList.map((item) => ({
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,
......@@ -44,6 +44,7 @@ const ReturnAddWarehouseBill = () => {
unit: item.category,
price: item.purchasePrice,
relatedCount: item.returnCount,
billCount: item.returnDeliveryCount,
})),
});
}
......
......@@ -109,7 +109,7 @@ const ReturnPrAddWarehousing: React.FC = () => {
align: 'center',
render: (text, record) => (
<Link
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.returnStorageId}`}
to={`/memberCenter/afterService/returnManage/returnPrAddWarehousing/warehousingDetail?id=${record.returnDeliveryId}`}
>
{text}
</Link>
......@@ -140,7 +140,7 @@ const ReturnPrAddWarehousing: React.FC = () => {
type="link"
onClick={
() =>
history.push(`/memberCenter/afterService/returnManage/returnPrAddWarehousing/add?applyId=${record.returnId}`)
history.push(`/memberCenter/afterService/returnManage/returnPrAddWarehousing/add?applyId=${record.returnId}&deliveryId=${record.returnDeliveryId}`)
}
>
新增
......
/*
* @Author: XieZhiXiong
* @Date: 2021-08-16 15:30:19
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-16 15:54:56
* @Description: 退货入库单详情
*/
import React from 'react';
import { DOC_TYPE_RETURN_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 WarehouseBillDetail = () => {
const { id } = usePageStatus();
const fetchRelatedInfo = (): Promise<RelatedInfoDataType> => {
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsGetReturnGoodsStorageDetail({
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,
billCount: item.returnDeliveryCount,
count: item.storageCount,
})),
});
}
reject();
}).catch((err) => {
reject(err);
});
});
};
return (
<>
<BillsFormPage
billType={DOC_TYPE_RETURN_RECEIPT}
fetchRelatedInfo={fetchRelatedInfo}
editable={false}
/>
</>
);
};
export default WarehouseBillDetail;
......@@ -84,7 +84,7 @@ const ReturnPrReceived: React.FC = () => {
align: 'center',
render: (text, record) => (
<Link
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.returnStorageId}`}
to={`/memberCenter/afterService/returnManage/returnPrAddWarehousing/warehousingDetail?id=${record.returnDeliveryId}`}
>
{text}
</Link>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment