Commit b78a59d6 authored by XieZhiXiong's avatar XieZhiXiong

Merge branch 'dev' into test

parents c5e23fa7 95e1ccb8
...@@ -5,67 +5,76 @@ ...@@ -5,67 +5,76 @@
* @Last Modified by: ghua * @Last Modified by: ghua
* @Last Modified time: 2020-10-29 11:17:33 * @Last Modified time: 2020-10-29 11:17:33
*/ */
import { RouterChild } from '../../utils/index';
export default { const route: RouterChild = {
// 换货处理 // 换货处理
path: '/memberCenter/afterService/handleExchange', path: '/memberCenter/afterService/exchangeManage',
name: 'handleExchange', name: 'exchangeManage',
routes: [ routes: [
// 换货申请单查询
{ {
// 换货申请单查询 path: '/memberCenter/afterService/exchangeManage/exchangeQuery',
path: '/memberCenter/afterService/handleExchange/orderList', name: 'exchangeQuery',
name: 'orderList', component: '@/pages/afterService/exchangeManage/exchangeQuery/index',
}, },
// 换货申请单查询-详情
{ {
// 待提交审核换货申请单 path: '/memberCenter/afterService/exchangeManage/exchangeQuery/detail',
path: '/memberCenter/afterService/handleExchange/waitAddExamineOrder', name: 'exchangeQueryDetail',
component: '@/pages/afterService/exchangeManage/exchangeQuery/detail',
},
// 待提交审核换货申请单
{
path: '/memberCenter/afterService/exchangeManage/waitAddExamineOrder',
name: 'waitAddExamineOrder', name: 'waitAddExamineOrder',
}, },
// 待审核换货申请单(一级)
{ {
// 待审核换货申请单(一级) path: '/memberCenter/afterService/exchangeManage/waitExamineLevelOne',
path: '/memberCenter/afterService/handleExchange/waitExamineLevelOne',
name: 'waitExamineLevelOne', name: 'waitExamineLevelOne',
}, },
// 待审核换货申请单(二级)
{ {
// 待审核换货申请单(二级) path: '/memberCenter/afterService/exchangeManage/waitExamineLevelTwo',
path: '/memberCenter/afterService/handleExchange/waitExamineLevelTwo',
name: 'waitExamineLevelTwo', name: 'waitExamineLevelTwo',
}, },
// 待确认换货申请单
{ {
// 待确认换货申请单 path: '/memberCenter/afterService/exchangeManage/waitConfirmExchangeOrder',
path: '/memberCenter/afterService/handleExchange/waitConfirmExchangeOrder',
name: 'waitConfirmExchangeOrder' name: 'waitConfirmExchangeOrder'
}, },
// 待新增退货入库单
{ {
// 待新增退货入库单 path: '/memberCenter/afterService/exchangeManage/waitAddReturnOrder',
path: '/memberCenter/afterService/handleExchange/waitAddReturnOrder',
name: 'waitAddReturnOrder', name: 'waitAddReturnOrder',
}, },
// 待退货收货
{ {
// 待退货收货 path: '/memberCenter/afterService/exchangeManage/waitReturnReceivingOrder',
path: '/memberCenter/afterService/handleExchange/waitReturnReceivingOrder',
name: 'waitReturnReceivingOrder', name: 'waitReturnReceivingOrder',
}, },
// 待新增换货发货单
{ {
// 待新增换货发货单 path: '/memberCenter/afterService/exchangeManage/waitSendOutOrder',
path: '/memberCenter/afterService/handleExchange/waitSendOutOrder',
name: 'waitSendOutOrder', name: 'waitSendOutOrder',
}, },
// 待新增物流单
{ {
// 待新增物流单 path: '/memberCenter/afterService/exchangeManage/waitAddLogisticsOrder',
path: '/memberCenter/afterService/handleExchange/waitAddLogisticsOrder',
name: 'waitAddLogisticsOrder', name: 'waitAddLogisticsOrder',
}, },
// 待换货发货
{ {
// 待换货发货 path: '/memberCenter/afterService/exchangeManage/waitSendOut',
path: '/memberCenter/afterService/handleExchange/waitSendOut',
name: 'waitSendOut', name: 'waitSendOut',
}, },
// 待确认换货回单
{ {
// 待确认换货回单 path: '/memberCenter/afterService/exchangeManage/exchangeConfirmOrder',
path: '/memberCenter/afterService/handleExchange/exchangeConfirmOrder',
name: 'exchangeConfirmOrder', name: 'exchangeConfirmOrder',
}, },
] ]
} };
\ No newline at end of file
export default route;
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
import ExchangeRoute from './exchangeRoute' import ExchangeRoute from './exchangeRoute'
import ExchangeHandleRoute from './exchangeHandleRoute' import ExchangeManageRoute from './exchangeManageRoute'
import ReturnRoute from './returnRoute' import ReturnRoute from './returnRoute'
import ReturnManageRoute from './returnManageRoute' import ReturnManageRoute from './returnManageRoute'
import RepairRoute from './repairRoute' import RepairRoute from './repairRoute'
...@@ -19,7 +19,7 @@ const AfterServiceRoute = { ...@@ -19,7 +19,7 @@ const AfterServiceRoute = {
icon: 'smile', icon: 'smile',
routes: [ routes: [
ExchangeRoute, ExchangeRoute,
ExchangeHandleRoute, ExchangeManageRoute,
ReturnRoute, ReturnRoute,
ReturnManageRoute, ReturnManageRoute,
RepairRoute, RepairRoute,
......
...@@ -498,19 +498,20 @@ export default { ...@@ -498,19 +498,20 @@ export default {
'menu.afterService.exchange.waitReceiving': '待换货收货', 'menu.afterService.exchange.waitReceiving': '待换货收货',
'menu.afterService.exchange.waitConfirm': '待确认售后完成', 'menu.afterService.exchange.waitConfirm': '待确认售后完成',
'menu.afterService.handleExchange': '换货处理', 'menu.afterService.exchangeManage': '换货处理',
'menu.afterService.handleExchange.orderList': '换货申请单查询', 'menu.afterService.exchangeManage.exchangeQuery': '换货申请单查询',
'menu.afterService.handleExchange.waitAddExamineOrder': '待提交审核换货申请单', 'menu.afterService.exchangeManage.exchangeQueryDetail': '查看换货申请单',
'menu.afterService.handleExchange.waitExamineLevelOne': '待审核换货申请单(一级)', 'menu.afterService.exchangeManage.waitAddExamineOrder': '待提交审核换货申请单',
'menu.afterService.handleExchange.waitExamineLevelTwo': '待审核换货申请单(二级)', 'menu.afterService.exchangeManage.waitExamineLevelOne': '待审核换货申请单(一级)',
'menu.afterService.handleExchange.waitConfirmExchangeOrder': '待确认换货申请单', 'menu.afterService.exchangeManage.waitExamineLevelTwo': '待审核换货申请单(二级)',
'menu.afterService.handleExchange.waitAddReturnOrder': '待新增退货入库单', 'menu.afterService.exchangeManage.waitConfirmExchangeOrder': '待确认换货申请单',
'menu.afterService.handleExchange.waitAddReturnOrderToAdd': '新增退货入库单', 'menu.afterService.exchangeManage.waitAddReturnOrder': '待新增退货入库单',
'menu.afterService.handleExchange.waitReturnReceivingOrder': '待退货收货', 'menu.afterService.exchangeManage.waitAddReturnOrderToAdd': '新增退货入库单',
'menu.afterService.handleExchange.waitSendOutOrder': '待新增换货发货单', 'menu.afterService.exchangeManage.waitReturnReceivingOrder': '待退货收货',
'menu.afterService.handleExchange.waitAddLogisticsOrder': '待新增物流单', 'menu.afterService.exchangeManage.waitSendOutOrder': '待新增换货发货单',
'menu.afterService.handleExchange.waitSendOut': '待换货发货', 'menu.afterService.exchangeManage.waitAddLogisticsOrder': '待新增物流单',
'menu.afterService.handleExchange.exchangeConfirmOrder': '待确认换货回单', 'menu.afterService.exchangeManage.waitSendOut': '待换货发货',
'menu.afterService.exchangeManage.exchangeConfirmOrder': '待确认换货回单',
'menu.afterService.returnApplication': '退货申请', 'menu.afterService.returnApplication': '退货申请',
'menu.afterService.returnApplication.returnQuery': '退货申请单查询', 'menu.afterService.returnApplication.returnQuery': '退货申请单查询',
......
import React from 'react';
import { usePageStatus } from '@/hooks/usePageStatus';
import DetailInfo from '../components/DetailInfo';
const ExchangeQueryDetail: React.FC = () => {
const { id, creditId } = usePageStatus();
return (
// <DetailInfo
// id={id}
// />
<div>123</div>
);
};
export default ExchangeQueryDetail;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-11 15:24:34
* @Description: 退货申请单查询
*/
import React, { useState, useRef } from 'react';
import { Card, Badge, Progress, Button } from 'antd';
import {
ClockCircleOutlined,
} from '@ant-design/icons';
import { StandardTable } from 'god';
import moment from 'moment';
import { ColumnType } from 'antd/lib/table/interface';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { createFormActions } from '@formily/antd';
import { PublicApi } from '@/services/api';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { coverColFiltersItem } from '@/utils';
import EyePreview from '@/components/EyePreview';
import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag';
import { listSearchSchema } from './schema';
import {
CREDIT_OUTER_STATUS_TAG_MAP,
CREDIT_INNER_STATUS_BADGE_MAP,
} from '../../contants';
import styles from './index.less';
const formActions = createFormActions();
const ExchangeQuery: React.FC = () => {
const ref = useRef<any>({});
const defaultColumns: ColumnType<any>[] = [
{
title: '申请单号',
dataIndex: 'applyNo',
align: 'center',
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/afterService/returnManage/returnQuery/detail?id=${record.id}`}
>
{text}
</EyePreview>
</>
),
},
{
title: '申请单摘要',
dataIndex: 'applyAbstract',
align: 'center',
},
{
title: '采购会员',
dataIndex: 'consumerName',
align: 'center',
},
{
title: '单据时间',
dataIndex: 'applyTime',
align: 'center',
},
{
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
},
{
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
];
const [columns, setColumns] = useState<any[]>(defaultColumns);
const fetchListData = (params: any) => {
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,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return Promise.resolve({
totalCount: 10,
data: {
applyNo: '123',
},
});
};
// 初始化高级筛选选项
const fetchSearchItems = async () => {
// const res = await PublicApi.getPayCreditApplyPageItemsByConsumer();
// if (res.code === 1000) {
// const { data } = res;
// const {
// outerStatusList = [],
// innerStatusList = [],
// } = data;
// const newColumns = columns.slice();
// // filter 0 过滤掉全部选项
// coverColFiltersItem(
// newColumns,
// 'outerStatusName',
// outerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
// );
// coverColFiltersItem(
// newColumns,
// 'innerStatusName',
// innerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
// );
// setColumns(newColumns);
// return {
// outerStatus: outerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
// innerStatus: innerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
// };
// }
return {};
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
);
};
export default ExchangeQuery;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-05 14:28:08
* @Description:
*/
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { UPLOAD_TYPE } from '@/constants';
export const listSearchSchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
applyNo: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
tip: '输入 申请单号 进行搜索',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
full: true,
autoRow: true,
columns: 6,
},
properties: {
applyAbstract: {
type: 'string',
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
},
},
consumerName: {
type: 'string',
'x-component-props': {
placeholder: '采购会员',
allowClear: true,
},
},
'[startTime, endTime]': {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
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': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
\ No newline at end of file
...@@ -15,9 +15,9 @@ import { FormOutlined } from '@ant-design/icons'; ...@@ -15,9 +15,9 @@ import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi'; import { history } from 'umi';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { GetPayCreditApplyGetApplyDetailResponse } from '@/services/PayApi'; import { GetAsReturnGoodsGetDetailBySupplierResponse } from '@/services/AfterServiceApi';
import { CREDIT_INNER_STATUS, CREDIT_OUTER_STATUS, CREDIT_STATUS } from '@/constants'; 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 AvatarWrap from '@/components/AvatarWrap';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
...@@ -51,7 +51,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -51,7 +51,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
target, target,
headExtra = null, headExtra = null,
}) => { }) => {
const [detailInfo, setDetailInfo] = useState<GetPayCreditApplyGetApplyDetailResponse>(null); const [detailInfo, setDetailInfo] = useState<GetAsReturnGoodsGetDetailBySupplierResponse>(null);
const [infoLoading, setInfoloading] = useState(false); const [infoLoading, setInfoloading] = useState(false);
const [visibleOrderDetial, setVisibleReturnInfo] = useState<boolean>(false); const [visibleOrderDetial, setVisibleReturnInfo] = useState<boolean>(false);
...@@ -164,27 +164,21 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -164,27 +164,21 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
}, },
]; ];
// 获取授信详情 // 获取退货申请详情
const getDetailInfo = () => { const getDetailInfo = () => {
if (!id) { if (!id) {
return; return;
} }
// setInfoloading(true); setInfoloading(true);
// PublicApi.getPayCreditApplyGetApplyDetail({ PublicApi.getAsReturnGoodsGetDetailBySupplier({
// applyId: id, returnId: id,
// }).then(res => { }).then(res => {
// if (res.code === 1000) { if (res.code === 1000) {
// setDetailInfo(res.data); setDetailInfo(res.data);
// setQuotaValues({ }
// applyQuota: res.data.apply.applyQuota, }).finally(() => {
// billDay: res.data.apply.billDay, setInfoloading(false);
// repayPeriod: res.data.apply.repayPeriod, });
// fileList: res.data.apply.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [],
// });
// }
// }).finally(() => {
// setInfoloading(false);
// });
}; };
useEffect(() => { useEffect(() => {
...@@ -206,7 +200,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -206,7 +200,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<AvatarWrap <AvatarWrap
info={{ info={{
aloneTxt: '单', aloneTxt: '单',
name: `申请单号:FPTY12}`, name: `申请单号:${detailInfo?.applyNo}`,
}} }}
/> />
} }
...@@ -223,9 +217,9 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -223,9 +217,9 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
padding: '0 32px', padding: '0 32px',
}} }}
> >
<Descriptions.Item label="申请单摘要:">进口头层黄牛皮荔枝纹</Descriptions.Item> <Descriptions.Item label="申请单摘要:">{detailInfo?.applyAbstract}</Descriptions.Item>
<Descriptions.Item label="供应会员">温州隆昌手袋有限公司</Descriptions.Item> <Descriptions.Item label="采购会员">{detailInfo?.consumerName}</Descriptions.Item>
<Descriptions.Item label="单据时间">2020-09-09 12:58:25</Descriptions.Item> <Descriptions.Item label="单据时间">{detailInfo?.applyTime}</Descriptions.Item>
<Descriptions.Item label="外部状态"> <Descriptions.Item label="外部状态">
<StatusTag type="success" title={'售后完成'} /> <StatusTag type="success" title={'售后完成'} />
</Descriptions.Item> </Descriptions.Item>
...@@ -241,36 +235,28 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -241,36 +235,28 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Col span={24}> <Col span={24}>
<Suspense fallback={null}> <Suspense fallback={null}>
<AuditProcess <AuditProcess
outerVerifySteps={[ outerVerifySteps={
{ detailInfo && detailInfo.outerTaskList ?
step: 1, detailInfo.outerTaskList.map(item => ({
stepName: '提交退货申请单', step: item.step,
roleName: '采购商', stepName: item.taskName,
status: 'finish', roleName: item.roleName,
}, status: item.isExecute ? 'finish' : 'wait',
{ })) :
step: 2, []
stepName: '确认退货申请单', }
roleName: '供应商', outerVerifyCurrent={findLastIndexFlowState(detailInfo?.outerTaskList)}
status: 'wait', innerVerifySteps={
}, detailInfo && detailInfo.innerTaskList ?
]} detailInfo.innerTaskList.map(item => ({
outerVerifyCurrent={1} step: item.step,
innerVerifySteps={[ stepName: item.taskName,
{ roleName: item.roleName,
step: 1, status: item.isExecute ? 'finish' : 'wait',
stepName: '新增物流单', })) :
roleName: '供应商', []
status: 'finish', }
}, innerVerifyCurrent={findLastIndexFlowState(detailInfo?.innerTaskList)}
{
step: 2,
stepName: '退货发货',
roleName: '采购商',
status: 'wait',
},
]}
innerVerifyCurrent={0}
/> />
</Suspense> </Suspense>
</Col> </Col>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41 * @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 17:44:59 * @LastEditTime: 2020-11-11 15:37:48
* @Description: 退货申请单查询 * @Description: 退货申请单查询
*/ */
import React, { useState, useRef } from 'react'; import React, { useState, useRef } from 'react';
...@@ -53,22 +53,22 @@ const ReturnPr1: React.FC = () => { ...@@ -53,22 +53,22 @@ const ReturnPr1: React.FC = () => {
}, },
{ {
title: '申请单摘要', title: '申请单摘要',
dataIndex: 'parentMemberName', dataIndex: 'applyAbstract',
align: 'center', align: 'center',
}, },
{ {
title: '采购会员', title: '采购会员',
dataIndex: 'supplier', dataIndex: 'consumerName',
align: 'center', align: 'center',
}, },
{ {
title: '退款金额', title: '退款金额',
dataIndex: 'returnAmount', dataIndex: 'refundAmount',
align: 'center', align: 'center',
}, },
{ {
title: '单据时间', title: '单据时间',
dataIndex: 'created', dataIndex: 'applyTime',
align: 'center', align: 'center',
}, },
{ {
...@@ -110,32 +110,21 @@ const ReturnPr1: React.FC = () => { ...@@ -110,32 +110,21 @@ const ReturnPr1: React.FC = () => {
const fetchListData = (params: any) => { const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params; const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({ PublicApi.getAsReturnGoodsPageToBeVerifyStepOne({
// startTime: 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, endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest, ...rest,
// }) })
// .then(res => { .then(res => {
// if (res.code === 1000) { if (res.code === 1000) {
// resolve(res.data); resolve(res.data);
// } }
// reject(); reject();
// }) })
// .catch(() => { .catch(() => {
// reject(); reject();
// }); });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
}); });
}; };
......
...@@ -35,28 +35,26 @@ export const listSearchSchema: ISchema = { ...@@ -35,28 +35,26 @@ export const listSearchSchema: ISchema = {
columns: 6, columns: 6,
}, },
properties: { properties: {
abstract: { applyAbstract: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '申请单摘要', placeholder: '申请单摘要',
allowClear: true, allowClear: true,
}, },
}, },
'[startTime, endTime]': { consumerName: {
type: 'string', type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '单据时间(全部)', placeholder: '采购会员',
allowClear: true, allowClear: true,
}, },
}, },
supplier: { '[startTime, endTime]': {
type: 'string', type: 'string',
default: undefined, default: '',
enum: [], 'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '采购会员(全部)', placeholder: '单据时间(全部)',
allowClear: true, allowClear: true,
}, },
}, },
......
...@@ -15,12 +15,25 @@ import DetailInfo from '../components/DetailInfo'; ...@@ -15,12 +15,25 @@ import DetailInfo from '../components/DetailInfo';
import VerifyModal from '../../components/VerifyModal'; import VerifyModal from '../../components/VerifyModal';
const ReturnPr1Verify: React.FC = () => { const ReturnPr1Verify: React.FC = () => {
const { id, creditId } = usePageStatus(); const { id } = usePageStatus();
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
const [confirmLoading, setConfirmLoading] = useState(false); const [confirmLoading, setConfirmLoading] = useState(false);
const handleSubmit = values => { const handleSubmit = values => {
if (!id) {
return;
}
setConfirmLoading(true);
PublicApi.postAsReturnGoodsVerifyStepOne({
applyId: id,
...values,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
}).finally(() => {
setConfirmLoading(false);
});
}; };
return ( return (
......
...@@ -53,22 +53,22 @@ const ReturnPr2: React.FC = () => { ...@@ -53,22 +53,22 @@ const ReturnPr2: React.FC = () => {
}, },
{ {
title: '申请单摘要', title: '申请单摘要',
dataIndex: 'parentMemberName', dataIndex: 'applyAbstract',
align: 'center', align: 'center',
}, },
{ {
title: '采购会员', title: '采购会员',
dataIndex: 'supplier', dataIndex: 'consumerName',
align: 'center', align: 'center',
}, },
{ {
title: '退款金额', title: '退款金额',
dataIndex: 'returnAmount', dataIndex: 'refundAmount',
align: 'center', align: 'center',
}, },
{ {
title: '单据时间', title: '单据时间',
dataIndex: 'created', dataIndex: 'applyTime',
align: 'center', align: 'center',
}, },
{ {
...@@ -110,32 +110,21 @@ const ReturnPr2: React.FC = () => { ...@@ -110,32 +110,21 @@ const ReturnPr2: React.FC = () => {
const fetchListData = (params: any) => { const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params; const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({ PublicApi.getAsReturnGoodsPageToBeVerifyStepTwo({
// startTime: 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, endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest, ...rest,
// }) })
// .then(res => { .then(res => {
// if (res.code === 1000) { if (res.code === 1000) {
// resolve(res.data); resolve(res.data);
// } }
// reject(); reject();
// }) })
// .catch(() => { .catch(() => {
// reject(); reject();
// }); });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
}); });
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06 * @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 17:19:00 * @LastEditTime: 2020-11-11 15:41:23
* @Description: * @Description:
*/ */
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
...@@ -35,28 +35,26 @@ export const listSearchSchema: ISchema = { ...@@ -35,28 +35,26 @@ export const listSearchSchema: ISchema = {
columns: 6, columns: 6,
}, },
properties: { properties: {
abstract: { applyAbstract: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '申请单摘要', placeholder: '申请单摘要',
allowClear: true, allowClear: true,
}, },
}, },
'[startTime, endTime]': { consumerName: {
type: 'string', type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '单据时间(全部)', placeholder: '采购会员',
allowClear: true, allowClear: true,
}, },
}, },
supplier: { '[startTime, endTime]': {
type: 'string', type: 'string',
default: undefined, default: '',
enum: [], 'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '采购会员(全部)', placeholder: '单据时间(全部)',
allowClear: true, allowClear: true,
}, },
}, },
......
...@@ -20,7 +20,20 @@ const ReturnPr2Verify: React.FC = () => { ...@@ -20,7 +20,20 @@ const ReturnPr2Verify: React.FC = () => {
const [confirmLoading, setConfirmLoading] = useState(false); const [confirmLoading, setConfirmLoading] = useState(false);
const handleSubmit = values => { const handleSubmit = values => {
if (!id) {
return;
}
setConfirmLoading(true);
PublicApi.postAsReturnGoodsVerifyStepTwo({
applyId: id,
...values,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
}).finally(() => {
setConfirmLoading(false);
});
}; };
return ( return (
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41 * @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 17:40:41 * @LastEditTime: 2020-11-11 15:46:52
* @Description: 退货申请单查询 * @Description: 退货申请单查询
*/ */
import React, { useState, useRef } from 'react'; import React, { useState, useRef } from 'react';
...@@ -53,22 +53,22 @@ const ReturnPrConfirm: React.FC = () => { ...@@ -53,22 +53,22 @@ const ReturnPrConfirm: React.FC = () => {
}, },
{ {
title: '申请单摘要', title: '申请单摘要',
dataIndex: 'parentMemberName', dataIndex: 'applyAbstract',
align: 'center', align: 'center',
}, },
{ {
title: '采购会员', title: '采购会员',
dataIndex: 'supplier', dataIndex: 'consumerName',
align: 'center', align: 'center',
}, },
{ {
title: '退款金额', title: '退款金额',
dataIndex: 'returnAmount', dataIndex: 'refundAmount',
align: 'center', align: 'center',
}, },
{ {
title: '单据时间', title: '单据时间',
dataIndex: 'created', dataIndex: 'applyTime',
align: 'center', align: 'center',
}, },
{ {
...@@ -110,32 +110,21 @@ const ReturnPrConfirm: React.FC = () => { ...@@ -110,32 +110,21 @@ const ReturnPrConfirm: React.FC = () => {
const fetchListData = (params: any) => { const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params; const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({ PublicApi.getAsReturnGoodsPageToBeConfirmVerify({
// startTime: 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, endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest, ...rest,
// }) })
// .then(res => { .then(res => {
// if (res.code === 1000) { if (res.code === 1000) {
// resolve(res.data); resolve(res.data);
// } }
// reject(); reject();
// }) })
// .catch(() => { .catch(() => {
// reject(); reject();
// }); });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
}); });
}; };
......
...@@ -35,28 +35,26 @@ export const listSearchSchema: ISchema = { ...@@ -35,28 +35,26 @@ export const listSearchSchema: ISchema = {
columns: 6, columns: 6,
}, },
properties: { properties: {
abstract: { applyAbstract: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '申请单摘要', placeholder: '申请单摘要',
allowClear: true, allowClear: true,
}, },
}, },
'[startTime, endTime]': { consumerName: {
type: 'string', type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '单据时间(全部)', placeholder: '采购会员',
allowClear: true, allowClear: true,
}, },
}, },
supplier: { '[startTime, endTime]': {
type: 'string', type: 'string',
default: undefined, default: '',
enum: [], 'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '采购会员(全部)', placeholder: '单据时间(全部)',
allowClear: true, allowClear: true,
}, },
}, },
......
...@@ -20,7 +20,20 @@ const ReturnPrConfirmVerify: React.FC = () => { ...@@ -20,7 +20,20 @@ const ReturnPrConfirmVerify: React.FC = () => {
const [confirmLoading, setConfirmLoading] = useState(false); const [confirmLoading, setConfirmLoading] = useState(false);
const handleSubmit = values => { const handleSubmit = values => {
if (!id) {
return;
}
setConfirmLoading(true);
PublicApi.postAsReturnGoodsConfirmVerify({
applyId: id,
...values,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
}).finally(() => {
setConfirmLoading(false);
});
}; };
return ( return (
...@@ -34,7 +47,7 @@ const ReturnPrConfirmVerify: React.FC = () => { ...@@ -34,7 +47,7 @@ const ReturnPrConfirmVerify: React.FC = () => {
icon={<FormOutlined />} icon={<FormOutlined />}
onClick={() => setVisible(true)} onClick={() => setVisible(true)}
> >
单据审核 确认单据
</Button> </Button>
)} )}
/> />
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41 * @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 17:16:57 * @LastEditTime: 2020-11-11 15:28:20
* @Description: 退货申请单查询 * @Description: 退货申请单查询
*/ */
import React, { useState, useRef } from 'react'; import React, { useState, useRef } from 'react';
...@@ -53,22 +53,22 @@ const ReturnPrSubmit: React.FC = () => { ...@@ -53,22 +53,22 @@ const ReturnPrSubmit: React.FC = () => {
}, },
{ {
title: '申请单摘要', title: '申请单摘要',
dataIndex: 'parentMemberName', dataIndex: 'applyAbstract',
align: 'center', align: 'center',
}, },
{ {
title: '采购会员', title: '采购会员',
dataIndex: 'supplier', dataIndex: 'consumerName',
align: 'center', align: 'center',
}, },
{ {
title: '退款金额', title: '退款金额',
dataIndex: 'returnAmount', dataIndex: 'refundAmount',
align: 'center', align: 'center',
}, },
{ {
title: '单据时间', title: '单据时间',
dataIndex: 'created', dataIndex: 'applyTime',
align: 'center', align: 'center',
}, },
{ {
...@@ -110,32 +110,21 @@ const ReturnPrSubmit: React.FC = () => { ...@@ -110,32 +110,21 @@ const ReturnPrSubmit: React.FC = () => {
const fetchListData = (params: any) => { const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params; const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({ PublicApi.getAsReturnGoodsPageToBeSubmitBySupplier({
// startTime: 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, endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest, ...rest,
// }) })
// .then(res => { .then(res => {
// if (res.code === 1000) { if (res.code === 1000) {
// resolve(res.data); resolve(res.data);
// } }
// reject(); reject();
// }) })
// .catch(() => { .catch(() => {
// reject(); reject();
// }); });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
}); });
}; };
......
...@@ -35,28 +35,26 @@ export const listSearchSchema: ISchema = { ...@@ -35,28 +35,26 @@ export const listSearchSchema: ISchema = {
columns: 6, columns: 6,
}, },
properties: { properties: {
abstract: { applyAbstract: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '申请单摘要', placeholder: '申请单摘要',
allowClear: true, allowClear: true,
}, },
}, },
'[startTime, endTime]': { consumerName: {
type: 'string', type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '单据时间(全部)', placeholder: '采购会员',
allowClear: true, allowClear: true,
}, },
}, },
supplier: { '[startTime, endTime]': {
type: 'string', type: 'string',
default: undefined, default: '',
enum: [], 'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '采购会员(全部)', placeholder: '单据时间(全部)',
allowClear: true, allowClear: true,
}, },
}, },
......
...@@ -15,12 +15,25 @@ import DetailInfo from '../components/DetailInfo'; ...@@ -15,12 +15,25 @@ import DetailInfo from '../components/DetailInfo';
import VerifyModal from '../../components/VerifyModal'; import VerifyModal from '../../components/VerifyModal';
const ReturnPrSubmitVerify: React.FC = () => { const ReturnPrSubmitVerify: React.FC = () => {
const { id, creditId } = usePageStatus(); const { id } = usePageStatus();
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
const [confirmLoading, setConfirmLoading] = useState(false); const [confirmLoading, setConfirmLoading] = useState(false);
const handleSubmit = values => { const handleSubmit = values => {
if (!id) {
return;
}
setConfirmLoading(true);
PublicApi.postAsReturnGoodsSubmitVerify({
applyId: id,
...values,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
}).finally(() => {
setConfirmLoading(false);
});
}; };
return ( return (
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41 * @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 15:45:13 * @LastEditTime: 2020-11-11 15:24:34
* @Description: 退货申请单查询 * @Description: 退货申请单查询
*/ */
import React, { useState, useRef } from 'react'; import React, { useState, useRef } from 'react';
...@@ -52,22 +52,22 @@ const ReturnQuery: React.FC = () => { ...@@ -52,22 +52,22 @@ const ReturnQuery: React.FC = () => {
}, },
{ {
title: '申请单摘要', title: '申请单摘要',
dataIndex: 'parentMemberName', dataIndex: 'applyAbstract',
align: 'center', align: 'center',
}, },
{ {
title: '采购会员', title: '采购会员',
dataIndex: 'supplier', dataIndex: 'consumerName',
align: 'center', align: 'center',
}, },
{ {
title: '退款金额', title: '退款金额',
dataIndex: 'returnAmount', dataIndex: 'refundAmount',
align: 'center', align: 'center',
}, },
{ {
title: '单据时间', title: '单据时间',
dataIndex: 'created', dataIndex: 'applyTime',
align: 'center', align: 'center',
}, },
{ {
...@@ -94,32 +94,21 @@ const ReturnQuery: React.FC = () => { ...@@ -94,32 +94,21 @@ const ReturnQuery: React.FC = () => {
const fetchListData = (params: any) => { const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params; const { startTime, endTime, ...rest } = params;
// return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({ PublicApi.getAsReturnGoodsPageBySupplier({
// startTime: 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, endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest, ...rest,
// }) })
// .then(res => { .then(res => {
// if (res.code === 1000) { if (res.code === 1000) {
// resolve(res.data); resolve(res.data);
// } }
// reject(); reject();
// }) })
// .catch(() => { .catch(() => {
// reject(); reject();
// }); });
// });
return Promise.resolve({
data: [
{
id: 1,
applyNo: '123',
parentMemberName: '申请单摘要',
created: '2020-11-03 11:46:00',
},
],
total: 10,
}); });
}; };
......
...@@ -35,28 +35,26 @@ export const listSearchSchema: ISchema = { ...@@ -35,28 +35,26 @@ export const listSearchSchema: ISchema = {
columns: 6, columns: 6,
}, },
properties: { properties: {
abstract: { applyAbstract: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '申请单摘要', placeholder: '申请单摘要',
allowClear: true, allowClear: true,
}, },
}, },
'[startTime, endTime]': { consumerName: {
type: 'string', type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '单据时间(全部)', placeholder: '采购会员',
allowClear: true, allowClear: true,
}, },
}, },
supplier: { '[startTime, endTime]': {
type: 'string', type: 'string',
default: undefined, default: '',
enum: [], 'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '采购会员(全部)', placeholder: '单据时间(全部)',
allowClear: true, allowClear: true,
}, },
}, },
......
...@@ -373,9 +373,9 @@ const SincerityInfo: React.FC<SincerityInfoProps> = ({ ...@@ -373,9 +373,9 @@ const SincerityInfo: React.FC<SincerityInfoProps> = ({
const getSummaryEvaluatePie = (data: EstimateSumItems[]) => { const getSummaryEvaluatePie = (data: EstimateSumItems[]) => {
const source = data || []; const source = data || [];
const count = source.reduce((pre, now) => now.sum + pre, 0); const count = source.reduce((pre, now) => now.sum + pre, 0);
const good = source[0] && source[0].sum ? source[0].sum : 0; const bad = source[0] && source[0].sum ? source[0].sum : 0;
const notBad = source[1] && source[1].sum ? source[1].sum : 0; const notBad = source[1] && source[1].sum ? source[1].sum : 0;
const bad = source[2] && source[2].sum ? source[2].sum : 0; const good = source[2] && source[2].sum ? source[2].sum : 0;
const ret = [ const ret = [
{ {
......
...@@ -132,9 +132,9 @@ const Analysis: React.FC<AnalysisProps> = ({ ...@@ -132,9 +132,9 @@ const Analysis: React.FC<AnalysisProps> = ({
const getSummaryEvaluatePie = (data: EstimateSumItems[]) => { const getSummaryEvaluatePie = (data: EstimateSumItems[]) => {
const source = data || []; const source = data || [];
const count = source.reduce((pre, now) => now.sum + pre, 0); const count = source.reduce((pre, now) => now.sum + pre, 0);
const good = source[0] && source[0].sum ? source[0].sum : 0; const bad = source[0] && source[0].sum ? source[0].sum : 0;
const notBad = source[1] && source[1].sum ? source[1].sum : 0; const notBad = source[1] && source[1].sum ? source[1].sum : 0;
const bad = source[2] && source[2].sum ? source[2].sum : 0; const good = source[2] && source[2].sum ? source[2].sum : 0;
const ret = [ const ret = [
{ {
......
...@@ -132,9 +132,9 @@ const Analysis: React.FC<AnalysisProps> = ({ ...@@ -132,9 +132,9 @@ const Analysis: React.FC<AnalysisProps> = ({
const getSummaryEvaluatePie = (data: EstimateSumItems[]) => { const getSummaryEvaluatePie = (data: EstimateSumItems[]) => {
const source = data || []; const source = data || [];
const count = source.reduce((pre, now) => now.sum + pre, 0); const count = source.reduce((pre, now) => now.sum + pre, 0);
const good = source[0] && source[0].sum ? source[0].sum : 0; const bad = source[0] && source[0].sum ? source[0].sum : 0;
const notBad = source[1] && source[1].sum ? source[1].sum : 0; const notBad = source[1] && source[1].sum ? source[1].sum : 0;
const bad = source[2] && source[2].sum ? source[2].sum : 0; const good = source[2] && source[2].sum ? source[2].sum : 0;
const ret = [ const ret = [
{ {
......
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