Commit 315e744f authored by 前端-许佳敏's avatar 前端-许佳敏
parents 2a5ae68a 93cdbde3
......@@ -734,9 +734,9 @@ export const InquiryStateTexts = {
*/
export const REPAIR_INNER_STATUS_UNCOMMITTED = 1;
/**
* 已提交
* 审核通过(提交)
*/
export const REPAIR_INNER_STATUS_COMMITTED = 2;
export const REPAIR_INNER_STATUS_COMMIT_SUCCESS = 2;
/**
* 一级审核通过
*/
......@@ -746,9 +746,9 @@ export const REPAIR_INNER_STATUS_SUCCESS_1 = 3;
*/
export const REPAIR_INNER_STATUS_SUCCESS_2 = 4;
/**
* 审核不通过(不接受申请)
* 二级审核不通过
*/
export const REPAIR_INNER_STATUS_FAILED = 5;
export const REPAIR_INNER_STATUS_FAILED_2 = 5;
/**
* 确认审核通过
*/
......@@ -761,15 +761,25 @@ export const REPAIR_INNER_STATUS_CONFIRM_FAILED = 7;
* 确认售后完成
*/
export const REPAIR_INNER_STATUS_FINISHED = 8;
/**
* 审核不通过(提交)
*/
export const REPAIR_INNER_STATUS_COMMIT_FAILED = 9;
/**
* 审核不通过(一级)
*/
export const REPAIR_INNER_STATUS_FAILED_1 = 10;
export const REPAIR_INNER_STATUS = {
[REPAIR_INNER_STATUS_UNCOMMITTED]: '待提交',
[REPAIR_INNER_STATUS_COMMITTED]: '已提交',
[REPAIR_INNER_STATUS_COMMIT_SUCCESS]: '审核通过(提交)',
[REPAIR_INNER_STATUS_SUCCESS_1]: '一级审核通过',
[REPAIR_INNER_STATUS_SUCCESS_2]: '二级审核通过',
[REPAIR_INNER_STATUS_FAILED]: '审核不通过',
[REPAIR_INNER_STATUS_FAILED_2]: '二级审核不通过',
[REPAIR_INNER_STATUS_CONFIRM_SUCCESS]: '确认审核通过',
[REPAIR_INNER_STATUS_CONFIRM_FAILED]: '确认审核不通过',
[REPAIR_INNER_STATUS_FINISHED]: '确认售后完成',
[REPAIR_INNER_STATUS_COMMIT_FAILED]: '审核不通过(提交)',
[REPAIR_INNER_STATUS_FAILED_1]: '审核不通过(一级)',
};
// 售后维修外部状态
......@@ -807,9 +817,9 @@ export const REPAIR_OUTER_STATUS = {
*/
export const EXCHANGE_INNER_STATUS_UNCOMMITTED = 1;
/**
* 已提交
* 审核通过(提交)
*/
export const EXCHANGE_INNER_STATUS_COMMITTED = 2;
export const EXCHANGE_INNER_STATUS_COMMIT_SUCCESS = 2;
/**
* 一级审核通过
*/
......@@ -910,9 +920,29 @@ export const EXCHANGE_INNER_STATUS_UNCONFIRMED_FINISHED = 26;
* 已确认售后完成
*/
export const EXCHANGE_INNER_STATUS_FINISHED = 27;
/**
* 不接受退货物流单
*/
export const EXCHANGE_INNER_STATUS_UNACCEPTED_RETURN_LOGISTICS = 28;
/**
* 不接受换货物流单
*/
export const EXCHANGE_INNER_STATUS_UNACCEPTED_RETURN_EXCHANGE = 29;
/**
* 审核不通过(提交)
*/
export const EXCHANGE_INNER_STATUS_COMMIT_FAILED = 30;
/**
* 审核不通过(一级)
*/
export const EXCHANGE_INNER_STATUS_FAILED_1 = 31;
/**
* 审核不通过(二级)
*/
export const EXCHANGE_INNER_STATUS_FAILED_2 = 32;
export const EXCHANGE_INNER_STATUS = {
[EXCHANGE_INNER_STATUS_UNCOMMITTED]: '待提交',
[EXCHANGE_INNER_STATUS_COMMITTED]: '已提交',
[EXCHANGE_INNER_STATUS_COMMIT_SUCCESS]: '审核通过(提交)',
[EXCHANGE_INNER_STATUS_SUCCESS_1]: '一级审核通过',
[EXCHANGE_INNER_STATUS_SUCCESS_2]: '二级审核通过',
[EXCHANGE_INNER_STATUS_FAILED]: '审核不通过',
......@@ -938,6 +968,11 @@ export const EXCHANGE_INNER_STATUS = {
[EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT]: '待确认换货回单',
[EXCHANGE_INNER_STATUS_UNCONFIRMED_FINISHED]: '待确认售后完成',
[EXCHANGE_INNER_STATUS_FINISHED]: '已确认售后完成',
[EXCHANGE_INNER_STATUS_UNACCEPTED_RETURN_LOGISTICS]: '不接受退货物流单',
[EXCHANGE_INNER_STATUS_UNACCEPTED_RETURN_EXCHANGE]: '不接受换货物流单',
[EXCHANGE_INNER_STATUS_COMMIT_FAILED]: '审核不通过(提交)',
[EXCHANGE_INNER_STATUS_FAILED_1]: '审核不通过(一级)',
[EXCHANGE_INNER_STATUS_FAILED_2]: '审核不通过(二级)',
};
// 售后换货外部状态
......@@ -1036,13 +1071,13 @@ export const EXCHANGE_OUTER_STATUS = {
// 售后退货内部状态
/**
* 待提交
* 待提交退
*/
export const RETURN_INNER_STATUS_UNCOMMITTED = 1;
/**
* 已提交
* 审核通过(提交)
*/
export const RETURN_INNER_STATUS_COMMITTED = 2;
export const RETURN_INNER_STATUS_COMMIT_SUCCESS = 2;
/**
* 一级审核通过
*/
......@@ -1052,9 +1087,9 @@ export const RETURN_INNER_STATUS_SUCCESS_1 = 3;
*/
export const RETURN_INNER_STATUS_SUCCESS_2 = 4;
/**
* 审核不通过(不接受申请)
* 审核不通过(二级)
*/
export const RETURN_INNER_STATUS_FAILED = 5;
export const RETURN_INNER_STATUS_FAILED_2 = 5;
/**
* 确认审核通过
*/
......@@ -1123,12 +1158,24 @@ export const RETURN_INNER_STATUS_UNCONFIRMED_FINISHED = 21;
* 已确认售后完成
*/
export const RETURN_INNER_STATUS_FINISHED = 22;
/**
* 不接受物流单
*/
export const RETURN_INNER_STATUS_UNACCEPTED_LOGISTICS = 23;
/**
* 审核不通过(提交)
*/
export const RETURN_INNER_STATUS_COMMIT_FAILED = 24;
/**
* 审核不通过(一级)
*/
export const RETURN_INNER_STATUS_FAILED_1 = 25;
export const RETURN_INNER_STATUS = {
[RETURN_INNER_STATUS_UNCOMMITTED]: '待提交',
[RETURN_INNER_STATUS_COMMITTED]: '已提交',
[RETURN_INNER_STATUS_COMMIT_SUCCESS]: '审核通过(提交)',
[RETURN_INNER_STATUS_SUCCESS_1]: '一级审核通过',
[RETURN_INNER_STATUS_SUCCESS_2]: '二级审核通过',
[RETURN_INNER_STATUS_FAILED]: '审核不通过',
[RETURN_INNER_STATUS_FAILED_2]: '二级审核不通过',
[RETURN_INNER_STATUS_CONFIRM_SUCCESS]: '确认审核通过',
[RETURN_INNER_STATUS_CONFIRM_FAILED]: '确认审核不通过',
[RETURN_INNER_STATUS_NOT_ADDED_RETURN_DELIVERY]: '待新增退货发货单',
......@@ -1146,6 +1193,9 @@ export const RETURN_INNER_STATUS = {
[RETURN_INNER_STATUS_REFUNDED_SUCCESS]: '待确认退款',
[RETURN_INNER_STATUS_UNCONFIRMED_FINISHED]: '待确认售后完成',
[RETURN_INNER_STATUS_FINISHED]: '已确认售后完成',
[RETURN_INNER_STATUS_UNACCEPTED_LOGISTICS]: '不接受物流单',
[RETURN_INNER_STATUS_COMMIT_FAILED]: '审核不通过(提交)',
[RETURN_INNER_STATUS_FAILED_1]: '审核不通过(一级)',
};
// 售后退货外部状态
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 09:54:04
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-04 18:04:07
* @LastEditTime: 2021-02-02 10:26:13
* @Description: 换货收货地址
*/
import React from 'react';
......@@ -64,7 +64,7 @@ interface ExchangeAddressInfo {
},
// onSubmit
onSubmit?: (values: Values) => void;
onSubmit: (values: Values) => void;
};
const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
......@@ -125,6 +125,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
shippingAddress: shippingAddress.id,
pickupAddress: shippingAddress.id,
}}
previewPlaceholder=" "
expressionScope={{
Address,
ShippingAddress,
......@@ -136,7 +137,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
// 联动配送方式
onFieldValueChange$('deliveryType').subscribe(fieldState => {
const { name, value } = fieldState;
const { value } = fieldState;
switch (value) {
// 物流
......@@ -172,10 +173,28 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
default:
break
};
if (onSubmit) {
onSubmit({
deliveryType: value,
id: undefined,
isDefault: undefined,
sendAddress: undefined,
sendUserName: undefined,
sendUserTel: undefined,
});
}
});
onFieldInputChange$('deliveryType').subscribe(fieldState => {
const { name, value } = fieldState;
if (value) {
linkage.value('*(shippingAddress,pickupAddress)', undefined);
}
});
onFieldValueChange$('*(shippingAddress,pickupAddress)').subscribe(fieldState => {
const { name, value, originAsyncData = [] } = fieldState;
onFieldInputChange$('*(shippingAddress,pickupAddress)').subscribe(fieldState => {
const { value, originAsyncData = [] } = fieldState;
const deliveryTypeValue = getFieldValue('deliveryType');
const fullData = originAsyncData.find(item => item.id === value);
......@@ -195,6 +214,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
actions={modalFormActions}
schema={schema}
onSubmit={handleSubmit}
colon
/>
</MellowCard>
);
......
......@@ -2,11 +2,11 @@
* @Author: XieZhiXiong
* @Date: 2020-11-09 15:56:35
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-25 15:19:36
* @LastEditTime: 2021-01-21 14:14:26
* @Description:
*/
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE, DELIVERY_TYPE_ENUM } from '@/constants';
import { DELIVERY_TYPE_ENUM } from '@/constants';
export const schema: ISchema = {
type: 'object',
......@@ -15,7 +15,7 @@ export const schema: ISchema = {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelCol: 8,
labelCol: 6,
wrapperCol: 16,
labelAlign: 'left',
},
......@@ -23,13 +23,19 @@ export const schema: ISchema = {
deliveryType: {
title: '配送方式',
type: 'string',
default: 1,
enum: DELIVERY_TYPE_ENUM,
'x-component-props': {
placeholder: '请选择',
style: {
width: '80%',
},
},
'x-rules': [
{
required: true,
message: '请选择配送方式',
},
],
},
deliveryAddress: {
type: 'object',
......@@ -42,6 +48,7 @@ export const schema: ISchema = {
shippingAddress: {
type: 'string',
title: '换货发货地址',
visible: false,
enum: [],
'x-component-props': {
placeholder: '请选择',
......@@ -59,6 +66,7 @@ export const schema: ISchema = {
pickupAddress: {
type: 'string',
title: '换货自提地址',
visible: false,
enum: [],
'x-component-props': {
placeholder: '请选择',
......
......@@ -38,30 +38,12 @@ interface ExchangeDeliverInfoProps {
* 是否是采购商
*/
isPurchaser?: boolean;
/**
* 确认退货回单
*/
onConfirmExchangeBack?: (id: number) => void;
/**
* 确认退货发货
*/
onConfirmExchangeDeliver?: (id: number) => Promise<any>;
/**
* 确认退货收货
*/
onConfirmExchangeReceive?: (id: number) => Promise<any>;
};
const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
summary = [],
detailed = [],
isPurchaser = false,
onConfirmExchangeBack,
onConfirmExchangeDeliver,
onConfirmExchangeReceive,
}) => {
const summaryColumns: EditableColumns[] = [
......@@ -78,6 +60,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
title: '商品名称',
dataIndex: 'productName',
align: 'center',
ellipsis: true,
},
{
title: '品类',
......@@ -135,6 +118,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
title: '商品名称',
dataIndex: 'productName',
align: 'center',
ellipsis: true,
},
{
title: '品类',
......@@ -177,38 +161,6 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
};
const handleConfirmExchangeDeliver = (id) => {
if (onConfirmExchangeDeliver) {
confirm({
title: '提示',
icon: <ExclamationCircleOutlined />,
content: `是否确认换货发货?`,
onOk() {
return onConfirmExchangeDeliver(id);
},
});
}
};
const handleConfirmExchangeReceive = (id) => {
if (onConfirmExchangeReceive) {
confirm({
title: '提示',
icon: <ExclamationCircleOutlined />,
content: `是否确认换货收货?`,
onOk() {
return onConfirmExchangeReceive(id);
},
});
}
};
const handleConfirmExchangeBack = (id) => {
if (onConfirmExchangeBack) {
onConfirmExchangeBack(id);
}
};
return (
<MellowCard>
<Tabs defaultActiveKey="2">
......@@ -268,39 +220,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
<Badge color={'#6C9CEB'} text={item.innerStatusName} />
</Descriptions.Item>
<Descriptions.Item>
{item.innerStatus === MAIL_INNER_STATUS_UNCONFIRMED_DELIVER && (
<a
style={{
textAlign: 'right',
display: 'block',
}}
onClick={() => handleConfirmExchangeDeliver(item.deliveryId)}
>
确认换货发货
</a>
)}
{item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_DELIVER && (
<a
style={{
textAlign: 'right',
display: 'block',
}}
onClick={() => handleConfirmExchangeReceive(item.deliveryId)}
>
确认换货收货
</a>
)}
{item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_RECEIVING && (
<a
style={{
textAlign: 'right',
display: 'block',
}}
onClick={() => handleConfirmExchangeBack(item.deliveryId)}
>
确认换货回单
</a>
)}
</Descriptions.Item>
</Descriptions>
</Col>
......
......@@ -79,6 +79,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
title: '商品名称',
dataIndex: 'productName',
align: 'center',
ellipsis: true,
},
{
title: '品类',
......@@ -136,6 +137,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
title: '商品名称',
dataIndex: 'productName',
align: 'center',
ellipsis: true,
},
{
title: '品类',
......@@ -276,39 +278,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
<Badge color={'#6C9CEB'} text={item.innerStatusName} />
</Descriptions.Item>
<Descriptions.Item>
{item.innerStatus === MAIL_INNER_STATUS_UNCONFIRMED_DELIVER && (
<a
style={{
textAlign: 'right',
display: 'block',
}}
onClick={() => handleConfirmReturnDeliver(item.deliveryId)}
>
确认退货发货
</a>
)}
{item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_DELIVER && (
<a
style={{
textAlign: 'right',
display: 'block',
}}
onClick={() => handleConfirmReturnReceive(item.deliveryId)}
>
确认退货收货
</a>
)}
{item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_RECEIVING && (
<a
style={{
textAlign: 'right',
display: 'block',
}}
onClick={() => handleConfirmReturnBack(item.deliveryId)}
>
确认退货回单
</a>
)}
</Descriptions.Item>
</Descriptions>
</Col>
......
......@@ -26,7 +26,7 @@ import {
EXCHANGE_OUTER_STATUS_FINISHED,
EXCHANGE_INNER_STATUS_UNCOMMITTED,
EXCHANGE_INNER_STATUS_COMMITTED,
EXCHANGE_INNER_STATUS_COMMIT_SUCCESS,
EXCHANGE_INNER_STATUS_SUCCESS_1,
EXCHANGE_INNER_STATUS_SUCCESS_2,
EXCHANGE_INNER_STATUS_FAILED,
......@@ -52,6 +52,11 @@ import {
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT,
EXCHANGE_INNER_STATUS_UNCONFIRMED_FINISHED,
EXCHANGE_INNER_STATUS_FINISHED,
EXCHANGE_INNER_STATUS_UNACCEPTED_RETURN_LOGISTICS,
EXCHANGE_INNER_STATUS_UNACCEPTED_RETURN_EXCHANGE,
EXCHANGE_INNER_STATUS_COMMIT_FAILED,
EXCHANGE_INNER_STATUS_FAILED_1,
EXCHANGE_INNER_STATUS_FAILED_2,
} from '@/constants';
// 售后换货外部状态 StatusTag map
......@@ -79,7 +84,7 @@ export const EXCHANGE_OUTER_STATUS_TAG_MAP = {
// 售后换货内部状态 Badge map
export const EXCHANGE_INNER_STATUS_BADGE_MAP = {
[EXCHANGE_INNER_STATUS_UNCOMMITTED]: '#669EDE',
[EXCHANGE_INNER_STATUS_COMMITTED]: '#41CC9E',
[EXCHANGE_INNER_STATUS_COMMIT_SUCCESS]: '#41CC9E',
[EXCHANGE_INNER_STATUS_SUCCESS_1]: '#41CC9E',
[EXCHANGE_INNER_STATUS_SUCCESS_2]: '#41CC9E',
[EXCHANGE_INNER_STATUS_FAILED]: '#EF6260',
......@@ -105,6 +110,11 @@ export const EXCHANGE_INNER_STATUS_BADGE_MAP = {
[EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT]: '#6C9CEB',
[EXCHANGE_INNER_STATUS_UNCONFIRMED_FINISHED]: '#6C9CEB',
[EXCHANGE_INNER_STATUS_FINISHED]: '#41CC9E',
[EXCHANGE_INNER_STATUS_UNACCEPTED_RETURN_LOGISTICS]: '#E63F3B',
[EXCHANGE_INNER_STATUS_UNACCEPTED_RETURN_EXCHANGE]: '#E63F3B',
[EXCHANGE_INNER_STATUS_COMMIT_FAILED]: '#E63F3B',
[EXCHANGE_INNER_STATUS_FAILED_1]: '#E63F3B',
[EXCHANGE_INNER_STATUS_FAILED_2]: '#E63F3B',
};
// 退货明细内部状态
......
......@@ -121,6 +121,7 @@ const DetailInfo: React.FC = () => {
title: '商品名称',
dataIndex: 'productName',
align: 'center',
ellipsis: true,
},
{
title: '品类',
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-12-18 16:55:17
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-18 16:55:17
* @LastEditTime: 2021-02-02 10:27:36
* @Description:
*/
import {
......@@ -13,13 +13,15 @@ import {
REPAIR_OUTER_STATUS_FINISHED,
REPAIR_INNER_STATUS_UNCOMMITTED,
REPAIR_INNER_STATUS_COMMITTED,
REPAIR_INNER_STATUS_COMMIT_SUCCESS,
REPAIR_INNER_STATUS_SUCCESS_1,
REPAIR_INNER_STATUS_SUCCESS_2,
REPAIR_INNER_STATUS_FAILED,
REPAIR_INNER_STATUS_FAILED_2,
REPAIR_INNER_STATUS_CONFIRM_SUCCESS,
REPAIR_INNER_STATUS_CONFIRM_FAILED,
REPAIR_INNER_STATUS_FINISHED,
REPAIR_INNER_STATUS_COMMIT_FAILED,
REPAIR_INNER_STATUS_FAILED_1,
} from '@/constants';
// 售后维修外部状态 StatusTag map
......@@ -34,11 +36,13 @@ export const REPAIR_OUTER_STATUS_TAG_MAP = {
// 售后维修内部部状态 Badge map
export const REPAIR_INNER_STATUS_BADGE_MAP = {
[REPAIR_INNER_STATUS_UNCOMMITTED]: '#669EDE',
[REPAIR_INNER_STATUS_COMMITTED]: '#41CC9E',
[REPAIR_INNER_STATUS_COMMIT_SUCCESS]: '#41CC9E',
[REPAIR_INNER_STATUS_SUCCESS_1]: '#41CC9E',
[REPAIR_INNER_STATUS_SUCCESS_2]: '#41CC9E',
[REPAIR_INNER_STATUS_FAILED]: '#EF6260',
[REPAIR_INNER_STATUS_FAILED_2]: '#EF6260',
[REPAIR_INNER_STATUS_CONFIRM_SUCCESS]: '#6C9CEB',
[REPAIR_INNER_STATUS_CONFIRM_FAILED]: '#EF6260',
[REPAIR_INNER_STATUS_FINISHED]: '#41CC9E',
[REPAIR_INNER_STATUS_COMMIT_FAILED]: '#EF6260',
[REPAIR_INNER_STATUS_FAILED_1]: '#EF6260',
};
\ No newline at end of file
......@@ -67,6 +67,7 @@ const DetailInfo: React.FC = () => {
title: '商品名称',
dataIndex: 'productName',
align: 'center',
ellipsis: true,
},
{
title: '品类',
......
......@@ -60,6 +60,10 @@ interface DetailInfoProps {
*/
id: string;
/**
* 是否是编辑的
*/
isEdit?: boolean;
/**
* 历史记录目标路径
*/
target?: string;
......@@ -71,6 +75,7 @@ interface DetailInfoProps {
const DetailInfo: React.FC<DetailInfoProps> = ({
id,
isEdit = false,
target = '/returnManage/query/orderDetail',
isPurchaser = false,
}) => {
......@@ -123,6 +128,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
title: '商品名称',
dataIndex: 'productName',
align: 'center',
ellipsis: true,
},
{
title: '品类',
......@@ -404,9 +410,10 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataSource={detailInfo && detailInfo.refundList ? detailInfo.refundList : []}
onRefund={handleRefund}
isPurchaser={isPurchaser}
innerStatus={detailInfo?.innerStatus}
outerStatus={detailInfo?.outerStatus}
purchaserId={detailInfo?.memberId}
purchaserRoleId={detailInfo?.roleId}
isEdit={isEdit}
/>
</Suspense>
</Col>
......
/*
* @Author: XieZhiXiong
* @Date: 2020-12-18 17:44:26
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-02-02 10:12:20
* @Description:
*/
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants';
......@@ -48,7 +55,7 @@ export const uploadVoucherModalSchema: ISchema = {
},
'x-rules': [
{
required: false,
required: true,
message: '请上传退款凭证',
},
],
......
......@@ -87,6 +87,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
title: '商品名称',
dataIndex: 'productName',
align: 'center',
ellipsis: true,
},
{
title: '品类',
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 18:02:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-26 17:44:10
* @LastEditTime: 2021-02-02 10:11:08
* @Description: 退款明细
*/
import React, { useState } from 'react';
......@@ -18,8 +18,9 @@ import {
PAY_CHANNEL_BALANCE,
PAY_CHANNEL_CREDIT,
PAY_CHANNEL_COD,
RETURN_INNER_STATUS_TO_BE_REFUNDED,
RETURN_INNER_STATUS_UNCONFIRMED_REFUNDED,
RETURN_OUTER_STATUS_TO_BE_REFUNDED,
RETURN_OUTER_STATUS_UNCONFIRMED_REFUNDED,
RETURN_OUTER_STATUS_NOT_RECEIVED,
} from '@/constants';
import Stamp from '../Stamp';
import CheckVoucherModal from '../CheckVoucherModal';
......@@ -54,9 +55,9 @@ interface ReturnDetailInfoProps {
*/
isPurchaser?: boolean;
/**
* 退货申请单部状态
* 退货申请单部状态
*/
innerStatus: number;
outerStatus: number;
/**
* 采购商id
*/
......@@ -65,6 +66,10 @@ interface ReturnDetailInfoProps {
* 采购商角色id
*/
purchaserRoleId: number,
/**
* 是否可操作的
*/
isEdit?: boolean,
};
const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
......@@ -72,14 +77,15 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
onRefund,
onConfirm,
isPurchaser = false,
innerStatus,
outerStatus,
purchaserId,
purchaserRoleId,
isEdit = false,
}) => {
const [visibleResult, setVisibleResult] = useState(false);
const [notReceivedLoading, setNotReceivedLoading] = useState(false);
const [receivedLoading, setReceivedLoading] = useState(false);
const [currentDetailItem, setCurrentDetailItem] = useState<{ id: number, fileList: FileData[] }>({
const [currentDetailItem, setCurrentDetailItem] = useState<{ id?: number, fileList: FileData[] }>({
id: 0,
fileList: [],
});
......@@ -104,6 +110,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
title: '商品名称',
dataIndex: 'productName',
align: 'center',
ellipsis: true,
},
{
title: '品类',
......@@ -221,16 +228,16 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
const handleConfirmResult = record => {
setCurrentDetailItem({
id: record.refundId,
fileList: record.payProveList.map(item => normalizeFiledata(item.proveUrl)),
fileList: record.payProve.fileList ? record.payProve.fileList.map(item => normalizeFiledata(item.proveUrl)) : [],
});
setVisibleResult(true);
};
const handleCheck = record => {
setCurrentDetailItem({
id: record.refundId,
fileList: record.payProveList.map(item => normalizeFiledata(item.proveUrl)),
fileList: record.payProve.fileList ? record.payProve.fileList.map(item => normalizeFiledata(item.proveUrl)) : [],
});
setVoucherVisible(true);
};
const handleRefundConfirm = (values, modalName) => {
......@@ -286,8 +293,12 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
<div className={styles['deliver-item-actions']}>
{
isEdit &&
!isPurchaser &&
innerStatus === RETURN_INNER_STATUS_TO_BE_REFUNDED &&
(
outerStatus === RETURN_OUTER_STATUS_TO_BE_REFUNDED ||
outerStatus === RETURN_OUTER_STATUS_NOT_RECEIVED
) &&
!!item.canRefund && (
item.outerStatus === REFUND_OUTER_STATUS_NOT_RECEIVED ||
item.innerStatus === REFUND_INNER_STATUS_NO_REFUND ||
......@@ -305,8 +316,9 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
{item.channel === PAY_CHANNEL_OFFLINE && (
<>
{
isEdit &&
isPurchaser &&
innerStatus === RETURN_INNER_STATUS_UNCONFIRMED_REFUNDED && (
outerStatus === RETURN_OUTER_STATUS_UNCONFIRMED_REFUNDED && (
item.outerStatus === REFUND_OUTER_STATUS_UNCONFIRMED_REFUND ||
item.outerStatus === REFUND_OUTER_STATUS_NOT_RECEIVED
) && (
......@@ -325,7 +337,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
) && (
<div
className={styles['deliver-item-check']}
onClick={() => handleCheck(record)}
onClick={() => handleCheck(item)}
>
查看
<RightOutlined />
......@@ -353,6 +365,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
title="确认还款结果"
width={576}
visible={visibleResult}
onCancel={() => setVisibleResult(false)}
footer={[
<Button
key="1"
......@@ -370,7 +383,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
未到账
</Button>,
<Button
key="2"
key="3"
type="primary"
loading={receivedLoading}
onClick={() => handleConfirm(currentDetailItem.id, 1)}
......
......@@ -2,77 +2,15 @@
* @Author: XieZhiXiong
* @Date: 2020-12-18 14:33:05
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-18 14:33:06
* @LastEditTime: 2021-02-02 09:58:08
* @Description:
*/
import {
REPAIR_OUTER_STATUS_UNCOMMITTED,
REPAIR_OUTER_STATUS_UNCONFIRMED,
REPAIR_OUTER_STATUS_FAILED,
REPAIR_OUTER_STATUS_SUCCESS,
REPAIR_OUTER_STATUS_FINISHED,
REPAIR_INNER_STATUS_UNCOMMITTED,
REPAIR_INNER_STATUS_COMMITTED,
REPAIR_INNER_STATUS_SUCCESS_1,
REPAIR_INNER_STATUS_SUCCESS_2,
REPAIR_INNER_STATUS_FAILED,
REPAIR_INNER_STATUS_CONFIRM_SUCCESS,
REPAIR_INNER_STATUS_CONFIRM_FAILED,
REPAIR_INNER_STATUS_FINISHED,
EXCHANGE_OUTER_STATUS_UNCOMMITTED,
EXCHANGE_OUTER_UNCONFIRMED,
EXCHANGE_OUTER_STATUS_FAILED,
EXCHANGE_OUTER_STATUS_SUCCESS,
EXCHANGE_OUTER_STATUS_NOT_ADDED_RETURN_DELIVERY,
EXCHANGE_OUTER_STATUS_CONSUMER_NOT_ADDED_LOGISTICS,
EXCHANGE_OUTER_STATUS_RETURN_DELIVERY,
EXCHANGE_OUTER_STATUS_NOT_ADDED_RETURN_STORAGE,
EXCHANGE_OUTER_STATUS_RETURN_RECEIVE,
EXCHANGE_OUTER_STATUS_UNCONFIRMED_RETURN_RECEIPT,
EXCHANGE_OUTER_STATUS_NOT_ADDED_REPLACE_DELIVERY,
EXCHANGE_OUTER_STATUS_SUPPLIER_NOT_ADDED_LOGISTICS,
EXCHANGE_OUTER_STATUS_REPLACE_DELIVERY,
EXCHANGE_OUTER_STATUS_NOT_ADDED_REPLACE_STORAGE,
EXCHANGE_OUTER_STATUS_REPLACE_RECEIVE,
EXCHANGE_OUTER_STATUS_UNCONFIRMED_REPLACE_RECEIPT,
EXCHANGE_OUTER_STATUS_UNCONFIRMED_FINISHED,
EXCHANGE_OUTER_STATUS_FINISHED,
EXCHANGE_INNER_STATUS_UNCOMMITTED,
EXCHANGE_INNER_STATUS_COMMITTED,
EXCHANGE_INNER_STATUS_SUCCESS_1,
EXCHANGE_INNER_STATUS_SUCCESS_2,
EXCHANGE_INNER_STATUS_FAILED,
EXCHANGE_INNER_STATUS_CONFIRM_SUCCESS,
EXCHANGE_INNER_STATUS_CONFIRM_FAILED,
EXCHANGE_INNER_STATUS_NOT_ADDED_RETURN_DELIVERY,
EXCHANGE_INNER_STATUS_UNREVIEWED_RETURN_DELIVERY,
EXCHANGE_INNER_STATUS_CONSUMER_NOT_ADDED_LOGISTICS,
EXCHANGE_INNER_STATUS_CONSUMER_UNCONFIRMED_LOGISTICS,
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY,
EXCHANGE_INNER_STATUS_NOT_ADDED_RETURN_STORAGE,
EXCHANGE_INNER_STATUS_UNREVIEWED_RETURN_STORAGE,
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE,
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT,
EXCHANGE_INNER_STATUS_NOT_ADDED_REPLACE_DELIVERY,
EXCHANGE_INNER_STATUS_UNREVIEWED_REPLACE_DELIVERY,
EXCHANGE_INNER_STATUS_SUPPLIER_NOT_ADDED_LOGISTICS,
EXCHANGE_INNER_STATUS_SUPPLIER_UNCONFIRMED_LOGISTICS,
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_DELIVERY,
EXCHANGE_INNER_STATUS_NOT_ADDED_REPLACE_STORAGE,
EXCHANGE_INNER_STATUS_UNREVIEWED_REPLACE_STORAGE,
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIVE,
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT,
EXCHANGE_INNER_STATUS_UNCONFIRMED_FINISHED,
EXCHANGE_INNER_STATUS_FINISHED,
RETURN_INNER_STATUS_UNCOMMITTED,
RETURN_INNER_STATUS_COMMITTED,
RETURN_INNER_STATUS_COMMIT_SUCCESS,
RETURN_INNER_STATUS_SUCCESS_1,
RETURN_INNER_STATUS_SUCCESS_2,
RETURN_INNER_STATUS_FAILED,
RETURN_INNER_STATUS_FAILED_2,
RETURN_INNER_STATUS_CONFIRM_SUCCESS,
RETURN_INNER_STATUS_CONFIRM_FAILED,
RETURN_INNER_STATUS_NOT_ADDED_RETURN_DELIVERY,
......@@ -90,6 +28,9 @@ import {
RETURN_INNER_STATUS_REFUNDED_SUCCESS,
RETURN_INNER_STATUS_UNCONFIRMED_FINISHED,
RETURN_INNER_STATUS_FINISHED,
RETURN_INNER_STATUS_UNACCEPTED_LOGISTICS,
RETURN_INNER_STATUS_COMMIT_FAILED,
RETURN_INNER_STATUS_FAILED_1,
RETURN_OUTER_STATUS_UNCOMMITTED,
RETURN_OUTER_UNCONFIRMED,
......@@ -148,10 +89,10 @@ export const RETURN_OUTER_STATUS_TAG_MAP = {
// 售后退货内部状态 Badge map
export const RETURN_INNER_STATUS_BADGE_MAP = {
[RETURN_INNER_STATUS_UNCOMMITTED]: '#669EDE',
[RETURN_INNER_STATUS_COMMITTED]: '#41CC9E',
[RETURN_INNER_STATUS_COMMIT_SUCCESS]: '#41CC9E',
[RETURN_INNER_STATUS_SUCCESS_1]: '#41CC9E',
[RETURN_INNER_STATUS_SUCCESS_2]: '#41CC9E',
[RETURN_INNER_STATUS_FAILED]: '#EF6260',
[RETURN_INNER_STATUS_FAILED_2]: '#EF6260',
[RETURN_INNER_STATUS_CONFIRM_SUCCESS]: '#41CC9E',
[RETURN_INNER_STATUS_CONFIRM_FAILED]: '#EF6260',
[RETURN_INNER_STATUS_NOT_ADDED_RETURN_DELIVERY]: '#E63F3B',
......@@ -169,6 +110,9 @@ export const RETURN_INNER_STATUS_BADGE_MAP = {
[RETURN_INNER_STATUS_REFUNDED_SUCCESS]: '#41CC9E',
[RETURN_INNER_STATUS_UNCONFIRMED_FINISHED]: '#6C9CEB',
[RETURN_INNER_STATUS_FINISHED]: '#41CC9E',
[RETURN_INNER_STATUS_UNACCEPTED_LOGISTICS]: '#E63F3B',
[RETURN_INNER_STATUS_COMMIT_FAILED]: '#E63F3B',
[RETURN_INNER_STATUS_FAILED_1]: '#E63F3B',
};
// 退款内部状态
......
/*
* @Author: XieZhiXiong
* @Date: 2020-12-18 17:44:26
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-02-02 10:07:12
* @Description:
*/
import React from 'react';
import { usePageStatus } from '@/hooks/usePageStatus';
import DetailInfo from '../components/DetailInfo';
......@@ -6,7 +13,7 @@ const ReturnPrReturnVerify: React.FC = () => {
const { id } = usePageStatus();
return (
<DetailInfo id={id} />
<DetailInfo id={id} isEdit />
);
};
......
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