Commit 13156315 authored by XieZhiXiong's avatar XieZhiXiong

完善业务逻辑

parent e88aab74
/*
* @Author: XieZhiXiong
* @Date: 2020-12-09 17:55:52
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-09 17:55:58
* @Description: 线下退款凭证
*/
import React from 'react';
import { Modal, Upload } from 'antd';
import styles from './index.less';
interface CheckVoucherModalProps {
visible: boolean;
fileList: {
uid: string,
name: string,
status: string,
url: string,
}[],
onCancel: () => void;
};
const CheckVoucherModal: React.FC<CheckVoucherModalProps> = ({
visible,
fileList = [],
onCancel,
}) => {
const handleCancel = () => {
if (onCancel) {
onCancel();
}
};
return (
<Modal
title="查看凭证"
width={576}
visible={visible}
onCancel={handleCancel}
footer={null}
bodyStyle={{
padding: '16px 24px 24px',
}}
destroyOnClose
>
<Upload
defaultFileList={fileList}
disabled
/>
</Modal>
);
};
export default CheckVoucherModal;
\ No newline at end of file
......@@ -2,18 +2,20 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 18:02:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-09 10:15:31
* @LastEditTime: 2020-12-09 18:04:31
* @Description: 退款明细
*/
import React from 'react';
import { Row, Col, Modal } from 'antd';
import React, { useState } from 'react';
import { Row, Col, Modal, Button, Upload } from 'antd';
import { CaretRightOutlined, CaretDownOutlined, RightOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
import MellowCard from '@/components/MellowCard';
import { EditableColumns } from '@/components/PolymericTable/interface';
import PolymericTable from '@/components/PolymericTable';
import StatusTag from '@/components/StatusTag';
import { FileData, normalizeFiledata } from '@/utils';
import Stamp from '../Stamp';
import DescribeLine from '../DescribeLine';
import CheckVoucherModal from '../CheckVoucherModal';
import {
REFUND_INNER_STATUS_NO_REFUND,
REFUND_OUTER_STATUS_NO_REFUND,
......@@ -37,7 +39,7 @@ interface ReturnDetailInfoProps {
/**
* 确认事件
*/
onConfirm?: (id: number) => Promise<any>;
onConfirm?: (id: number, flag: 0 | 1) => Promise<any>;
};
const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
......@@ -45,6 +47,14 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
onRefund,
onConfirm,
}) => {
const [visibleResult, setVisibleResult] = useState(false);
const [notReceivedLoading, setNotReceivedLoading] = useState(false);
const [receivedLoading, setReceivedLoading] = useState(false);
const [currentDetailItem, setCurrentDetailItem] = useState<{ id: number, fileList: FileData[] }>({
id: 0,
fileList: [],
});
const [voucherVisible, setVoucherVisible] = useState(false);
const columns: EditableColumns[] = [
{
......@@ -122,19 +132,30 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
}
};
const handleConfirm = id => {
const handleConfirm = (id, flag) => {
if (onConfirm) {
confirm({
title: '提示',
icon: <ExclamationCircleOutlined />,
content: `是否确认退款已到账?`,
onOk() {
return onConfirm(id);
},
flag === 1 ? setReceivedLoading(true) : setNotReceivedLoading(true);
onConfirm(id, flag).finally(() => {
flag === 1 ? setReceivedLoading(false) : setNotReceivedLoading(false);
});
}
};
const handleConfirmResult = record => {
setCurrentDetailItem({
id: record.refundId,
fileList: record.payProveList.map(item => normalizeFiledata(item.proveUrl)),
});
setVisibleResult(true);
};
const handleCheck = record => {
setCurrentDetailItem({
id: record.refundId,
fileList: record.payProveList.map(item => normalizeFiledata(item.proveUrl)),
});
};
return (
<MellowCard title="退款明细">
<PolymericTable
......@@ -195,7 +216,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
) && (
<div
className={styles['deliver-item-return']}
onClick={() => handleConfirm(item.refundId)}
onClick={() => handleConfirmResult(item)}
>
确认
</div>
......@@ -203,6 +224,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
}
<div
className={styles['deliver-item-check']}
onClick={() => handleCheck(record)}
>
查看
<RightOutlined />
......@@ -215,6 +237,49 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
),
}}
/>
<CheckVoucherModal
visible={voucherVisible}
fileList={currentDetailItem.fileList}
onCancel={() => setVoucherVisible(false)}
/>
<Modal
title="确认还款结果"
width={576}
visible={visibleResult}
footer={[
<Button
key="1"
onClick={() => setVisibleResult(false)}
>
取消
</Button>,
<Button
key="2"
type="primary"
loading={notReceivedLoading}
onClick={() => handleConfirm(currentDetailItem.id, 0)}
danger
>
未到账
</Button>,
<Button
key="2"
type="primary"
loading={receivedLoading}
onClick={() => handleConfirm(currentDetailItem.id, 1)}
>
已到账
</Button>,
]}
destroyOnClose
>
<Upload
defaultFileList={[]}
disabled
/>
</Modal>
</MellowCard>
);
};
......
......@@ -276,4 +276,38 @@ export const REFUND_OUTER_STATUS_TAG_MAP = {
[REFUND_OUTER_STATUS_UNCONFIRMED_REFUND]: 'primary',
[REFUND_OUTER_STATUS_NOT_RECEIVED]: 'warning',
[REFUND_OUTER_STATUS_RECEIVED]: 'success',
};
\ No newline at end of file
};
// 支付渠道
/**
* 积分支付
*/
export const PAY_CHANNEL_INTEGRAL = 0;
/**
* 支付宝
*/
export const PAY_CHANNEL_ALI = 1;
/**
* 微信
*/
export const PAY_CHANNEL_WECHAT = 2;
/**
* 银联
*/
export const PAY_CHANNEL_UNION = 3;
/**
* 余额
*/
export const PAY_CHANNEL_BALANCE = 4;
/**
* 线下支付
*/
export const PAY_CHANNEL_OFFLINE = 5;
/**
* 授信
*/
export const PAY_CHANNEL_CREDIT = 6;
/**
* 货到付款
*/
export const PAY_CHANNEL_COD = 7;
\ No newline at end of file
......@@ -156,8 +156,8 @@ const ExchangePrAddDeliver: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeAddReturnDeliveryGoods({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -132,8 +132,8 @@ const ExchangePrAddLogistics: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeAddLogisticsByConsumer({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -156,8 +156,8 @@ const ExchangePrAddWarehousing: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeAddReplaceGoodsStorage({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -113,8 +113,8 @@ const ExchangePrConfirmBack: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeConfirmReturnGoodsReceipt({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -113,8 +113,8 @@ const ExchangePrDeliver: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeReturnDeliveryGoods({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -102,8 +102,8 @@ const ExchangePrFinished: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeComplete({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+tartTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -114,8 +114,8 @@ const ExchangePrReceived: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeReplaceReceiveGoods({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -174,8 +174,8 @@ const ExchangePrSubmit: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeSubmitByConsumer({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-19 14:36:17
* @LastEditTime: 2020-12-10 10:01:41
* @Description: 换货申请单查询
*/
import React, { useState, useRef } from 'react';
......@@ -91,8 +91,8 @@ const ExchangeQuery: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageByConsumer({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -101,8 +101,8 @@ const ExchangePr1: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeVerifyStepOne({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -101,8 +101,8 @@ const ExchangePr2: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeVerifyStepTwo({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -147,8 +147,8 @@ const ExchangePrAddDeliver: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeAddReplaceDeliveryGoods({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -132,8 +132,8 @@ const ReturnPrAddLogistics: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeAddLogisticsBySupplier({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -156,8 +156,8 @@ const ExchangePrAddWarehousing: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeAddReturnGoodsStorage({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -101,8 +101,8 @@ const ExchangePrConfirm: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeConfirmVerify({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -113,8 +113,8 @@ const ExchangePrConfirmBack: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeConfirmReplaceGoodsReceipt({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -113,8 +113,8 @@ const ExchangePrDeliver: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeReplaceDeliveryGoods({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -115,8 +115,8 @@ const ExchangePrReceived: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeReturnReceiveGoods({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -101,8 +101,8 @@ const ExchangePrSubmit: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageToBeSubmitBySupplier({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-19 18:23:23
* @LastEditTime: 2020-12-10 10:03:15
* @Description: 换货申请单查询
*/
import React, { useState, useRef } from 'react';
......@@ -91,8 +91,8 @@ const ExchangeQuery: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReplaceGoodsPageBySupplier({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -102,8 +102,8 @@ const RepairPrFinished: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsRepairGoodsPageToBeConfirmComplete({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -168,8 +168,8 @@ const RepairPrSubmit: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsRepairGoodsPageToBeSubmitByConsumer({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -84,8 +84,8 @@ const RepairQuery: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsRepairGoodsPageByConsumer({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -94,8 +94,8 @@ const RepairPr1: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsRepairGoodsPageToBeVerifyStepOne({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -94,8 +94,8 @@ const RepairPr2: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsRepairGoodsPageToBeVerifyStepTwo({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -94,8 +94,8 @@ const RepairPrConfirm: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsRepairGoodsPageToBeConfirm({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -94,8 +94,8 @@ const RepairPrSubmit: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsRepairGoodsPageToBeSubmitBySupplier({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -84,8 +84,8 @@ const RepairManageQuery: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsRepairGoodsPageBySupplier({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -161,8 +161,8 @@ const ReturnPrAddDeliver: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeAddReturnDeliveryGoods({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -137,8 +137,8 @@ const ReturnPrAddLogistics: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeAddLogisticsByConsumer({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -120,8 +120,8 @@ const ReturnPrConfirmBack: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeConfirmReturnGoodsReceipt({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -109,8 +109,8 @@ const ReturnPrConfirmFinish: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeComplete({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -114,8 +114,8 @@ const ReturnPrConfirmResult: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeConfirmRefund({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -120,8 +120,8 @@ const ReturnPrDeliver: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeReturnDeliveryGoods({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -179,8 +179,8 @@ const ReturnPrSubmit: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeSubmitByConsumer({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -96,8 +96,8 @@ const ReturnQuery: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageByConsumer({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -106,8 +106,8 @@ const ReturnPr1: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeVerifyStepOne({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -106,8 +106,8 @@ const ReturnPr2: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeVerifyStepTwo({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -161,8 +161,8 @@ const ReturnPrAddWarehousing: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeAddReturnGoodsStorage({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -106,8 +106,8 @@ const ReturnPrConfirm: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeConfirmVerify({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -120,8 +120,8 @@ const ReturnPrReceived: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeReturnReceiveGoods({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -111,8 +111,8 @@ const ReturnPrReturn: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeRefund({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -106,8 +106,8 @@ const ReturnPrSubmit: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageToBeSubmitBySupplier({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-11 15:24:34
* @LastEditTime: 2020-12-10 10:07:08
* @Description: 退货申请单查询
*/
import React, { useState, useRef } from 'react';
......@@ -96,8 +96,8 @@ const ReturnQuery: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getAsReturnGoodsPageBySupplier({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
......@@ -196,8 +196,8 @@ const QuotaPrSubmit: React.FC = () => {
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getPayCreditApplyPageWaitSubmitCreditApply({
startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
endTime: startTime ? moment(+startTime).format('YYYY-MM-DD') : null,
...rest,
})
.then(res => {
......
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