Commit a52a6c20 authored by XieZhiXiong's avatar XieZhiXiong

对接售后退货申请能先对接的接口

parent 260243d7
......@@ -988,7 +988,7 @@ export const CREDIT_OUTER_STATUS = {
[CREDIT_OUTER_STATUS_FAILED]: '不接受申请',
};
// 售后维修申请内部状态
// 售后维修内部状态
export const REPAIR_INNER_STATUS_UNCOMMITTED = 1; // 待提交维修
export const REPAIR_INNER_STATUS_COMMITTED = 2; // 已提交
export const REPAIR_INNER_STATUS_SUCCESS_1 = 3; // 一级审核通过
......@@ -1008,7 +1008,7 @@ export const REPAIR_INNER_STATUS = {
[REPAIR_INNER_STATUS_FINISHED]: '确认售后完成',
};
// 售后维修申请外部状态
// 售后维修外部状态
export const REPAIR_OUTER_STATUS_UNCOMMITTED = 1; // 待提交申请单
export const REPAIR_OUTER_STATUS_UNCONFIRMED = 2; // 待确认
export const REPAIR_OUTER_STATUS_FAILED = 3; // 不接受申请
......@@ -1020,4 +1020,38 @@ export const REPAIR_OUTER_STATUS = {
[REPAIR_OUTER_STATUS_FAILED]: '不接受申请',
[REPAIR_OUTER_STATUS_SUCCESS]: '接受申请',
[REPAIR_OUTER_STATUS_FINISHED]: '售后完成',
};
// 售后退货内部状态
export const RETURN_INNER_STATUS_UNCOMMITTED = 1; // 待提交退货
export const RETURN_INNER_STATUS_COMMITTED = 2; // 已提交
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_CONFIRM_SUCCESS = 6; // 确认审核通过
export const RETURN_INNER_STATUS_CONFIRM_FAILED = 7; // 确认审核不通过
export const RETURN_INNER_STATUS_FINISHED = 8; // 确认售后完成
export const RETURN_INNER_STATUS = {
[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]: '确认售后完成',
};
// 售后退货外部状态
export const RETURN_OUTER_STATUS_UNCOMMITTED = 1; // 待提交申请单
export const RETURN_OUTER_STATUS_UNCONFIRMED = 2; // 待确认
export const RETURN_OUTER_STATUS_FAILED = 3; // 不接受申请
export const RETURN_OUTER_STATUS_SUCCESS = 4; // 接受申请
export const RETURN_OUTER_STATUS_FINISHED = 5; // 售后完成
export const RETURN_OUTER_STATUS = {
[REPAIR_OUTER_STATUS_UNCOMMITTED]: '待提交',
[REPAIR_OUTER_STATUS_UNCONFIRMED]: '待确认',
[REPAIR_OUTER_STATUS_FAILED]: '不接受申请',
[REPAIR_OUTER_STATUS_SUCCESS]: '接受申请',
[REPAIR_OUTER_STATUS_FINISHED]: '售后完成',
};
\ No newline at end of file
......@@ -16,7 +16,7 @@ import { REPAIR_OUTER_STATUS_TAG_MAP } from '../../constants';
interface OuterCirculationRecordProps {
dataSource: {
roleName: string,
status: number,
status: number | string,
operate: string,
operateTime: string,
opinion: string,
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-05 14:35:00
* @LastEditTime: 2020-11-11 10:45:59
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -42,20 +42,19 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
'[startTime, endTime]': {
supplierName: {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
placeholder: '供应会员',
allowClear: true,
},
},
supplierName: {
'[startTime, endTime]': {
type: 'string',
default: undefined,
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '供应会员',
placeholder: '单据时间(全部)',
allowClear: true,
},
},
......
......@@ -56,19 +56,18 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
'[startTime, endTime]': {
type: 'string',
'x-component': 'dateSelect',
supplierName: {
type: 'string',
'x-component-props': {
placeholder: '单据时间(全部)',
placeholder: '供应会员',
allowClear: true,
},
},
supplierName: {
type: 'string',
default: undefined,
'[startTime, endTime]': {
type: 'string',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '供应会员',
placeholder: '单据时间(全部)',
allowClear: true,
},
},
......
......@@ -42,20 +42,19 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
'[startTime, endTime]': {
supplierName: {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
placeholder: '供应会员',
allowClear: true,
},
},
supplierName: {
'[startTime, endTime]': {
type: 'string',
default: undefined,
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '供应会员',
placeholder: '单据时间(全部)',
allowClear: true,
},
},
......
......@@ -42,6 +42,13 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
consumerName: {
type: 'string',
'x-component-props': {
placeholder: '采购会员',
allowClear: true,
},
},
'[startTime, endTime]': {
type: 'string',
default: '',
......@@ -51,14 +58,6 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
consumerName: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '采购会员(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......
......@@ -42,6 +42,13 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
consumerName: {
type: 'string',
'x-component-props': {
placeholder: '采购会员',
allowClear: true,
},
},
'[startTime, endTime]': {
type: 'string',
default: '',
......@@ -51,14 +58,6 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
consumerName: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '采购会员(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......
......@@ -42,6 +42,13 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
consumerName: {
type: 'string',
'x-component-props': {
placeholder: '采购会员',
allowClear: true,
},
},
'[startTime, endTime]': {
type: 'string',
default: '',
......@@ -51,14 +58,6 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
consumerName: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '采购会员(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......
......@@ -42,6 +42,13 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
consumerName: {
type: 'string',
'x-component-props': {
placeholder: '采购会员',
allowClear: true,
},
},
'[startTime, endTime]': {
type: 'string',
default: '',
......@@ -51,14 +58,6 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
consumerName: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '采购会员(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-04 18:43:15
* @LastEditTime: 2020-11-11 10:52:36
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -42,6 +42,13 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
consumerName: {
type: 'string',
'x-component-props': {
placeholder: '采购会员',
allowClear: true,
},
},
'[startTime, endTime]': {
type: 'string',
default: '',
......@@ -51,14 +58,6 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
consumerName: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '采购会员(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
......
......@@ -14,9 +14,9 @@ import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import { PublicApi } from '@/services/api';
import { GetPayCreditApplyGetApplyDetailResponse } from '@/services/PayApi';
import { GetAsReturnGoodsGetDetailByConsumerResponse } from '@/services/AfterServiceApi';
import { CREDIT_INNER_STATUS, CREDIT_OUTER_STATUS, CREDIT_STATUS } from '@/constants';
import { normalizeFiledata, FileData } from '@/utils';
import { normalizeFiledata, FileData, findLastIndexFlowState } from '@/utils';
import AvatarWrap from '@/components/AvatarWrap';
import StatusTag from '@/components/StatusTag';
import EyePreview from '@/components/EyePreview';
......@@ -50,7 +50,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
target,
headExtra = null,
}) => {
const [detailInfo, setDetailInfo] = useState<GetPayCreditApplyGetApplyDetailResponse>(null);
const [detailInfo, setDetailInfo] = useState<GetAsReturnGoodsGetDetailByConsumerResponse>(null);
const [infoLoading, setInfoloading] = useState(false);
const [visibleOrderDetial, setVisibleReturnInfo] = useState<boolean>(false);
......@@ -148,27 +148,21 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
},
];
// 获取授信详情
// 获取退货申请详情
const getDetailInfo = () => {
if (!id) {
return;
}
// setInfoloading(true);
// PublicApi.getPayCreditApplyGetApplyDetail({
// applyId: id,
// }).then(res => {
// if (res.code === 1000) {
// setDetailInfo(res.data);
// setQuotaValues({
// applyQuota: res.data.apply.applyQuota,
// billDay: res.data.apply.billDay,
// repayPeriod: res.data.apply.repayPeriod,
// fileList: res.data.apply.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [],
// });
// }
// }).finally(() => {
// setInfoloading(false);
// });
setInfoloading(true);
PublicApi.getAsReturnGoodsGetDetailByConsumer({
returnId: id,
}).then(res => {
if (res.code === 1000) {
setDetailInfo(res.data);
}
}).finally(() => {
setInfoloading(false);
});
};
useEffect(() => {
......@@ -190,7 +184,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<AvatarWrap
info={{
aloneTxt: '单',
name: `申请单号:FPTY12}`,
name: `申请单号:${detailInfo?.applyNo}`,
}}
/>
}
......@@ -207,9 +201,9 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
padding: '0 32px',
}}
>
<Descriptions.Item label="申请单摘要:">进口头层黄牛皮荔枝纹</Descriptions.Item>
<Descriptions.Item label="供应会员">温州隆昌手袋有限公司</Descriptions.Item>
<Descriptions.Item label="单据时间">2020-09-09 12:58:25</Descriptions.Item>
<Descriptions.Item label="申请单摘要">{detailInfo?.applyAbstract}</Descriptions.Item>
<Descriptions.Item label="供应会员">{detailInfo?.supplierName}</Descriptions.Item>
<Descriptions.Item label="单据时间">{detailInfo?.applyTime}</Descriptions.Item>
<Descriptions.Item label="外部状态">
<StatusTag type="success" title={'售后完成'} />
</Descriptions.Item>
......@@ -225,21 +219,15 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Col span={24}>
<Suspense fallback={null}>
<OuterCirculation
steps={[
{
title: '提交维修申请单',
description: '采购商',
},
{
title: '确认维修申请单',
description: '供应商',
},
{
title: '确认售后完成',
description: '采购商',
},
]}
current={1}
steps={
detailInfo && detailInfo.outerTaskList ?
detailInfo.outerTaskList.map(item => ({
title: item.taskName,
description: item.roleName,
})) :
[]
}
current={findLastIndexFlowState(detailInfo?.outerTaskList)}
/>
</Suspense>
</Col>
......@@ -313,7 +301,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Col span={24}>
<Suspense fallback={null}>
<OuterCirculationRecord dataSource={[]} />
<OuterCirculationRecord dataSource={detailInfo?.outerRecordList} />
</Suspense>
</Col>
</Row>
......
......@@ -67,22 +67,22 @@ const ReturnPrAddDeliver: React.FC = () => {
},
{
title: '申请单摘要',
dataIndex: 'parentMemberName',
dataIndex: 'applyAbstract',
align: 'center',
},
{
title: '供应会员',
dataIndex: 'supplier',
dataIndex: 'supplierName',
align: 'center',
},
{
title: '退款金额',
dataIndex: 'returnAmount',
dataIndex: 'refundAmount',
align: 'center',
},
{
title: '单据时间',
dataIndex: 'created',
dataIndex: 'applyTime',
align: 'center',
},
{
......@@ -141,32 +141,21 @@ const ReturnPrAddDeliver: React.FC = () => {
const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
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,
...rest,
})
.then(res => {
if (res.code === 1000) {
resolve(res.data);
}
reject();
})
.catch(() => {
reject();
});
});
};
......@@ -210,7 +199,7 @@ const ReturnPrAddDeliver: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'returnId',
}}
columns={columns}
currentRef={ref}
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 17:53:29
* @LastEditTime: 2020-11-11 10:42:56
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -35,28 +35,26 @@ export const listSearchSchema: ISchema = {
columns: 6,
},
properties: {
abstract: {
applyAbstract: {
type: 'string',
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
},
},
'[startTime, endTime]': {
supplierName: {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
placeholder: '供应会员',
allowClear: true,
},
},
supplier: {
'[startTime, endTime]': {
type: 'string',
default: undefined,
enum: [],
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '供应会员(全部)',
placeholder: '单据时间(全部)',
allowClear: true,
},
},
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-06 16:41:12
* @LastEditTime: 2020-11-11 09:53:54
* @Description: 待新增退货发货单
*/
import React, { useState, useRef } from 'react';
......@@ -53,22 +53,22 @@ const ReturnPrAddLogistics: React.FC = () => {
},
{
title: '申请单摘要',
dataIndex: 'parentMemberName',
dataIndex: 'applyAbstract',
align: 'center',
},
{
title: '供应会员',
dataIndex: 'supplier',
dataIndex: 'supplierName',
align: 'center',
},
{
title: '退款金额',
dataIndex: 'returnAmount',
dataIndex: 'refundAmount',
align: 'center',
},
{
title: '单据时间',
dataIndex: 'created',
dataIndex: 'applyTime',
align: 'center',
},
{
......@@ -127,32 +127,21 @@ const ReturnPrAddLogistics: React.FC = () => {
const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
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,
...rest,
})
.then(res => {
if (res.code === 1000) {
resolve(res.data);
}
reject();
})
.catch(() => {
reject();
});
});
};
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-05 14:28:08
* @LastEditTime: 2020-11-11 10:39:47
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -35,49 +35,29 @@ export const listSearchSchema: ISchema = {
columns: 6,
},
properties: {
abstract: {
applyAbstract: {
type: 'string',
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
},
},
'[startTime, endTime]': {
supplierName: {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
placeholder: '供应会员',
allowClear: true,
},
},
supplier: {
'[startTime, endTime]': {
type: 'string',
default: undefined,
enum: [],
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '供应会员(全部)',
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 11:33:35
* @LastEditTime: 2020-11-11 10:21:46
* @Description: 待新增退货发货单
*/
import React, { useState, useRef } from 'react';
......@@ -56,22 +56,22 @@ const ReturnPrConfirmBack: React.FC = () => {
},
{
title: '申请单摘要',
dataIndex: 'parentMemberName',
dataIndex: 'applyAbstract',
align: 'center',
},
{
title: '供应会员',
dataIndex: 'supplier',
dataIndex: 'applyAbstract',
align: 'center',
},
{
title: '退款金额',
dataIndex: 'returnAmount',
dataIndex: 'refundAmount',
align: 'center',
},
{
title: '单据时间',
dataIndex: 'created',
dataIndex: 'applyTime',
align: 'center',
},
{
......@@ -124,32 +124,21 @@ const ReturnPrConfirmBack: React.FC = () => {
const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
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,
...rest,
})
.then(res => {
if (res.code === 1000) {
resolve(res.data);
}
reject();
})
.catch(() => {
reject();
});
});
};
......
......@@ -35,49 +35,29 @@ export const listSearchSchema: ISchema = {
columns: 6,
},
properties: {
abstract: {
applyAbstract: {
type: 'string',
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
},
},
'[startTime, endTime]': {
supplierName: {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
placeholder: '供应会员',
allowClear: true,
},
},
supplier: {
'[startTime, endTime]': {
type: 'string',
default: undefined,
enum: [],
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '供应会员(全部)',
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......
......@@ -7,14 +7,23 @@ import { usePageStatus } from '@/hooks/usePageStatus';
import DetailInfo from '../components/DetailInfo';
const ReturnPrConfirmBackVerify: React.FC = () => {
const { id, creditId } = usePageStatus();
const { id } = usePageStatus();
const [submitLoading, setSubmitLoading] = useState(false);
const handleSubmit = values => {
const handleSubmit = () => {
if (!id) {
return;
}
setSubmitLoading(true);
PublicApi.postAsReturnGoodsConfirmAllReturnGoodsReceipt({
returnId: id,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
}).finally(() => {
setSubmitLoading(false);
});
};
return (
......@@ -25,7 +34,8 @@ const ReturnPrConfirmBackVerify: React.FC = () => {
<Button
type="primary"
icon={<FormOutlined />}
onClick={() => {}}
loading={submitLoading}
onClick={() => handleSubmit}
>
确认全部退货发货单已收到回单
</Button>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 14:52:16
* @LastEditTime: 2020-11-11 10:34:51
* @Description: 待新增退货发货单
*/
import React, { useState, useRef } from 'react';
......@@ -56,22 +56,22 @@ const ReturnPrConfirmFinish: React.FC = () => {
},
{
title: '申请单摘要',
dataIndex: 'parentMemberName',
dataIndex: 'applyAbstract',
align: 'center',
},
{
title: '供应会员',
dataIndex: 'supplier',
dataIndex: 'supplierName',
align: 'center',
},
{
title: '退款金额',
dataIndex: 'returnAmount',
dataIndex: 'refundAmount',
align: 'center',
},
{
title: '单据时间',
dataIndex: 'created',
dataIndex: 'applyTime',
align: 'center',
},
{
......@@ -113,32 +113,21 @@ const ReturnPrConfirmFinish: React.FC = () => {
const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
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,
...rest,
})
.then(res => {
if (res.code === 1000) {
resolve(res.data);
}
reject();
})
.catch(() => {
reject();
});
});
};
......
......@@ -35,49 +35,29 @@ export const listSearchSchema: ISchema = {
columns: 6,
},
properties: {
abstract: {
applyAbstract: {
type: 'string',
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
},
},
'[startTime, endTime]': {
supplierName: {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
placeholder: '供应会员',
allowClear: true,
},
},
supplier: {
'[startTime, endTime]': {
type: 'string',
default: undefined,
enum: [],
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '供应会员(全部)',
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......
......@@ -8,7 +8,7 @@ import DetailInfo from '../components/DetailInfo';
import FinishedModal from '../../components/FinishedModal';
const ReturnPrConfirmFinishVerify: React.FC = () => {
const { id, creditId } = usePageStatus();
const { id } = usePageStatus();
const [visible, setVisible] = useState(false);
const [confirmLoading, setConfirmLoading] = useState(false);
......@@ -16,6 +16,17 @@ const ReturnPrConfirmFinishVerify: React.FC = () => {
if (!id) {
return;
}
setConfirmLoading(true);
PublicApi.postAsReturnGoodsConfirmComplete({
returnId: id,
evaluate: values,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
}).finally(() => {
setConfirmLoading(false);
});
};
return (
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 13:54:49
* @LastEditTime: 2020-11-11 10:30:24
* @Description: 待新增退货发货单
*/
import React, { useState, useRef } from 'react';
......@@ -56,22 +56,22 @@ const ReturnPrConfirmResult: React.FC = () => {
},
{
title: '申请单摘要',
dataIndex: 'parentMemberName',
dataIndex: 'applyAbstract',
align: 'center',
},
{
title: '供应会员',
dataIndex: 'supplier',
dataIndex: 'supplierName',
align: 'center',
},
{
title: '退款金额',
dataIndex: 'returnAmount',
dataIndex: 'refundAmount',
align: 'center',
},
{
title: '单据时间',
dataIndex: 'created',
dataIndex: 'applyTime',
align: 'center',
},
{
......@@ -118,32 +118,21 @@ const ReturnPrConfirmResult: React.FC = () => {
const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
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,
...rest,
})
.then(res => {
if (res.code === 1000) {
resolve(res.data);
}
reject();
})
.catch(() => {
reject();
});
});
};
......
......@@ -35,49 +35,29 @@ export const listSearchSchema: ISchema = {
columns: 6,
},
properties: {
abstract: {
applyAbstract: {
type: 'string',
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
},
},
'[startTime, endTime]': {
supplierName: {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
placeholder: '供应会员',
allowClear: true,
},
},
supplier: {
'[startTime, endTime]': {
type: 'string',
default: undefined,
enum: [],
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '供应会员(全部)',
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......
......@@ -7,13 +7,23 @@ import { usePageStatus } from '@/hooks/usePageStatus';
import DetailInfo from '../components/DetailInfo';
const ReturnPrConfirmResultVerify: React.FC = () => {
const { id, creditId } = usePageStatus();
const { id } = usePageStatus();
const [submitLoading, setSubmitLoading] = useState(false);
const handleSubmit = values => {
if (!id) {
return;
}
setSubmitLoading(true);
PublicApi.postAsReturnGoodsConfirmAllRefund({
returnId: id,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
}).finally(() => {
setSubmitLoading(false);
});
};
return (
......@@ -24,7 +34,8 @@ const ReturnPrConfirmResultVerify: React.FC = () => {
<Button
type="primary"
icon={<FormOutlined />}
onClick={() => {}}
loading={submitLoading}
onClick={() => handleSubmit}
>
确认本单所有退款到账
</Button>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 11:10:50
* @LastEditTime: 2020-11-11 10:04:10
* @Description: 待新增退货发货单
*/
import React, { useState, useRef } from 'react';
......@@ -56,17 +56,17 @@ const ReturnPrDeliver: React.FC = () => {
},
{
title: '申请单摘要',
dataIndex: 'parentMemberName',
dataIndex: 'applyAbstract',
align: 'center',
},
{
title: '供应会员',
dataIndex: 'supplier',
dataIndex: 'supplierName',
align: 'center',
},
{
title: '退款金额',
dataIndex: 'returnAmount',
dataIndex: 'refundAmount',
align: 'center',
},
{
......@@ -124,32 +124,21 @@ const ReturnPrDeliver: React.FC = () => {
const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
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,
...rest,
})
.then(res => {
if (res.code === 1000) {
resolve(res.data);
}
reject();
})
.catch(() => {
reject();
});
});
};
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-05 14:28:08
* @LastEditTime: 2020-11-11 10:42:02
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -35,49 +35,29 @@ export const listSearchSchema: ISchema = {
columns: 6,
},
properties: {
abstract: {
applyAbstract: {
type: 'string',
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
},
},
'[startTime, endTime]': {
supplierName: {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
placeholder: '供应会员',
allowClear: true,
},
},
supplier: {
'[startTime, endTime]': {
type: 'string',
default: undefined,
enum: [],
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '供应会员(全部)',
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......
......@@ -16,11 +16,9 @@ const ReturnPrDeliverVerify: React.FC = () => {
if (!id) {
return;
}
setSubmitLoading(true);
// PublicApi.postPayCreditHandleVerifyStepOne({
// applyId: id,
// isPass: values.agree,
// opinion: values.reason,
// setSubmitLoading(true);
// PublicApi.postAsReturnGoodsConfirmReturnDeliveryGoods({
// deliveryId: id,
// }).then(res => {
// if (res.code === 1000) {
// history.goBack();
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 10:13:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-06 16:41:29
* @LastEditTime: 2020-11-10 18:09:45
* @Description: 待提交退货申请单
*/
import React, { useState, useRef } from 'react';
......@@ -65,22 +65,22 @@ const ReturnPrSubmit: React.FC = () => {
},
{
title: '申请单摘要',
dataIndex: 'parentMemberName',
dataIndex: 'applyAbstract',
align: 'center',
},
{
title: '供应会员',
dataIndex: 'supplier',
dataIndex: 'supplierName',
align: 'center',
},
{
title: '退款金额',
dataIndex: 'returnAmount',
dataIndex: 'refundAmount',
align: 'center',
},
{
title: '单据时间',
dataIndex: 'created',
dataIndex: 'applyTime',
align: 'center',
},
{
......@@ -135,32 +135,21 @@ const ReturnPrSubmit: React.FC = () => {
const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
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,
...rest,
})
.then(res => {
if (res.code === 1000) {
resolve(res.data);
}
reject();
})
.catch(() => {
reject();
});
});
};
......@@ -220,7 +209,7 @@ const ReturnPrSubmit: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'returnId',
}}
columns={columns}
currentRef={ref}
......@@ -236,7 +225,7 @@ const ReturnPrSubmit: React.FC = () => {
useStateFilterSearchLinkageEffect(
$,
actions,
'cond',
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-05 14:34:48
* @LastEditTime: 2020-11-11 10:41:50
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -30,11 +30,12 @@ export const listSearchSchema: ISchema = {
children: '{{controllerBtns}}',
},
},
cond: {
applyNo: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索',
tip: '输入 申请单号 进行搜索',
},
},
},
......@@ -48,27 +49,25 @@ export const listSearchSchema: ISchema = {
},
},
properties: {
abstract: {
applyAbstract: {
type: 'string',
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
},
},
'[startTime, endTime]': {
type: 'string',
'x-component': 'dateSelect',
supplierName: {
type: 'string',
'x-component-props': {
placeholder: '单据时间(全部)',
placeholder: '供应会员',
allowClear: true,
},
},
supplier: {
type: 'string',
default: undefined,
enum: [],
'[startTime, endTime]': {
type: 'string',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '供应会员(全部)',
placeholder: '单据时间(全部)',
allowClear: true,
},
},
......
......@@ -52,22 +52,22 @@ const ReturnQuery: React.FC = () => {
},
{
title: '申请单摘要',
dataIndex: 'parentMemberName',
dataIndex: 'applyAbstract',
align: 'center',
},
{
title: '供应会员',
dataIndex: 'supplier',
dataIndex: 'supplierName',
align: 'center',
},
{
title: '退款金额',
dataIndex: 'returnAmount',
dataIndex: 'refundAmount',
align: 'center',
},
{
title: '单据时间',
dataIndex: 'created',
dataIndex: 'applyTime',
align: 'center',
},
{
......@@ -94,32 +94,21 @@ const ReturnQuery: React.FC = () => {
const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
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,
...rest,
})
.then(res => {
if (res.code === 1000) {
resolve(res.data);
}
reject();
})
.catch(() => {
reject();
});
});
};
......@@ -163,7 +152,7 @@ const ReturnQuery: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'returnId',
}}
columns={columns}
currentRef={ref}
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-05 14:28:08
* @LastEditTime: 2020-11-11 10:40:56
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -35,28 +35,26 @@ export const listSearchSchema: ISchema = {
columns: 6,
},
properties: {
abstract: {
applyAbstract: {
type: 'string',
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
},
},
'[startTime, endTime]': {
supplierName: {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
placeholder: '供应会员',
allowClear: true,
},
},
supplier: {
'[startTime, endTime]': {
type: 'string',
default: undefined,
enum: [],
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '供应会员(全部)',
placeholder: '单据时间(全部)',
allowClear: true,
},
},
......
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