Commit fe37a72f authored by XieZhiXiong's avatar XieZhiXiong

修改 rowId

parent 39959d24
......@@ -28,8 +28,25 @@ const route: RouterChild = {
},
// 待提交审核换货申请单
{
path: '/memberCenter/afterService/exchangeManage/waitAddExamineOrder',
name: 'waitAddExamineOrder',
path: '/memberCenter/afterService/exchangeManage/exchangePrSubmit',
name: 'exchangePrSubmit',
component: '@/pages/afterService/exchangeManage/exchangePrSubmit/index',
},
// 待提交审核换货申请单-详情
{
path: '/memberCenter/afterService/exchangeManage/exchangePrSubmit/detail',
name: 'exchangeQueryDetail',
component: '@/pages/afterService/exchangeManage/exchangePrSubmit/detail',
hideInMenu: true,
noMargin: true,
},
// 待提交审核换货申请单-审核
{
path: '/memberCenter/afterService/exchangeManage/exchangePrSubmit/verify',
name: 'verifyExchangePrSubmit',
component: '@/pages/afterService/exchangeManage/exchangePrSubmit/verify',
hideInMenu: true,
noMargin: true,
},
// 待审核换货申请单(一级)
{
......
......@@ -501,7 +501,8 @@ export default {
'menu.afterService.exchangeManage': '换货处理',
'menu.afterService.exchangeManage.exchangeQuery': '换货申请单查询',
'menu.afterService.exchangeManage.exchangeQueryDetail': '查看换货申请单',
'menu.afterService.exchangeManage.waitAddExamineOrder': '待提交审核换货申请单',
'menu.afterService.exchangeManage.exchangePrSubmit': '待提交审核换货申请单',
'menu.afterService.exchangeManage.verifyExchangePrSubmit': '审核换货申请单',
'menu.afterService.exchangeManage.waitExamineLevelOne': '待审核换货申请单(一级)',
'menu.afterService.exchangeManage.waitExamineLevelTwo': '待审核换货申请单(二级)',
'menu.afterService.exchangeManage.waitConfirmExchangeOrder': '待确认换货申请单',
......
import React from 'react';
import { usePageStatus } from '@/hooks/usePageStatus';
import DetailInfo from '../components/DetailInfo';
const ExchangePrSubmitDetail: React.FC = () => {
const { id } = usePageStatus();
return (
<DetailInfo
id={id}
/>
);
};
export default ExchangePrSubmitDetail;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-11-17 18:07:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-12 09:40:11
* @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 { history } from 'umi';
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 ExchangePrSubmit: React.FC = () => {
const ref = useRef<any>({});
const defaultColumns: ColumnType<any>[] = [
{
title: '申请单号',
dataIndex: 'applyNo',
align: 'center',
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/afterService/exchangeManage/exchangePrSubmit/detail?id=${record.replaceId}`}
>
{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="待确认售后完成" />,
},
{
title: '操作',
dataIndex: 'option',
align: 'center',
render: (text, record) => (
<>
<Button
type="link"
onClick={() => history.push(`/memberCenter/afterService/exchangeManage/exchangePrSubmit/verify?id=${record.replaceId}`)}
>
提交审核
</Button>
</>
),
},
];
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: 'replaceId',
}}
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 ExchangePrSubmit;
\ 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,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-11-04 17:22:07
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-17 18:13:55
* @Description:
*/
import React, { useState } from 'react';
import { Button } from 'antd';
import { history } from 'umi';
import { PublicApi } from '@/services/api';
import { FormOutlined } from '@ant-design/icons';
import { usePageStatus } from '@/hooks/usePageStatus';
import DetailInfo from '../components/DetailInfo';
import VerifyModal from '../../components/VerifyModal';
const ExchangePrSubmitVerify: React.FC = () => {
const { id } = usePageStatus();
const [visible, setVisible] = useState(false);
const [confirmLoading, setConfirmLoading] = useState(false);
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 (
<>
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
headExtra={(
<Button
type="primary"
icon={<FormOutlined />}
onClick={() => setVisible(true)}
>
提交审核
</Button>
)}
isEdit
/>
<VerifyModal
visible={visible}
confirmLoading={confirmLoading}
onSubmit={handleSubmit}
onVisible={() => setVisible(false)}
/>
</>
);
};
export default ExchangePrSubmitVerify;
\ No newline at end of file
......@@ -3,7 +3,7 @@ import { usePageStatus } from '@/hooks/usePageStatus';
import DetailInfo from '../components/DetailInfo';
const ExchangeQueryDetail: React.FC = () => {
const { id, creditId } = usePageStatus();
const { id } = usePageStatus();
return (
<DetailInfo
......
......@@ -2,8 +2,8 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-12 09:40:11
* @Description: 退货申请单查询
* @LastEditTime: 2020-11-17 18:21:27
* @Description: 货申请单查询
*/
import React, { useState, useRef } from 'react';
import { Card, Badge, Progress, Button } from 'antd';
......@@ -43,7 +43,7 @@ const ExchangeQuery: React.FC = () => {
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/afterService/exchangeManage/exchangeQuery/detail?id=${record.id}`}
url={`/memberCenter/afterService/exchangeManage/exchangeQuery/detail?id=${record.replaceId}`}
>
{text}
</EyePreview>
......@@ -155,7 +155,7 @@ const ExchangeQuery: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'applyNo',
rowKey: 'replaceId',
}}
columns={columns}
currentRef={ref}
......
......@@ -36,7 +36,7 @@ const RepairQuery: React.FC = () => {
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/afterService/repairApplication/repairQuery/detail?id=${record.id}`}
url={`/memberCenter/afterService/repairApplication/repairQuery/detail?id=${record.applyId}`}
>
{text}
</EyePreview>
......
......@@ -156,7 +156,7 @@ const RepairPr1: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'applyId',
}}
columns={columns}
currentRef={ref}
......
......@@ -156,7 +156,7 @@ const RepairPr2: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'applyId',
}}
columns={columns}
currentRef={ref}
......
......@@ -156,7 +156,7 @@ const RepairPrConfirm: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'applyId',
}}
columns={columns}
currentRef={ref}
......
......@@ -156,7 +156,7 @@ const RepairPrSubmit: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'applyId',
}}
columns={columns}
currentRef={ref}
......
......@@ -151,7 +151,7 @@ const RepairManageQuery: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'applyId',
}}
columns={columns}
currentRef={ref}
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-11 15:37:48
* @LastEditTime: 2020-11-17 18:20:28
* @Description: 退货申请单查询
*/
import React, { useState, useRef } from 'react';
......@@ -44,7 +44,7 @@ const ReturnPr1: React.FC = () => {
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/afterService/returnManage/returnPr1/detail?id=${record.id}`}
url={`/memberCenter/afterService/returnManage/returnPr1/detail?id=${record.returnId}`}
>
{text}
</EyePreview>
......@@ -97,7 +97,7 @@ const ReturnPr1: React.FC = () => {
<>
<Button
type="link"
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPr1/verify`)}
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPr1/verify?id=${record.returnId}`)}
>
提交审核
</Button>
......@@ -168,7 +168,7 @@ const ReturnPr1: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'returnId',
}}
columns={columns}
currentRef={ref}
......
......@@ -44,7 +44,7 @@ const ReturnPr2: React.FC = () => {
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/afterService/returnManage/returnPr2/detail?id=${record.id}`}
url={`/memberCenter/afterService/returnManage/returnPr2/detail?id=${record.returnId}`}
>
{text}
</EyePreview>
......@@ -97,7 +97,7 @@ const ReturnPr2: React.FC = () => {
<>
<Button
type="link"
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPr2/verify`)}
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPr2/verify?id=${record.returnId}`)}
>
提交审核
</Button>
......@@ -168,7 +168,7 @@ const ReturnPr2: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'returnId',
}}
columns={columns}
currentRef={ref}
......
......@@ -58,7 +58,7 @@ const ReturnPrAddWarehousing: React.FC = () => {
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/afterService/returnManage/returnPrAddWarehousing/detail?id=${record.id}`}
url={`/memberCenter/afterService/returnManage/returnPrAddWarehousing/detail?id=${record.returnId}`}
>
{text}
</EyePreview>
......@@ -210,7 +210,7 @@ const ReturnPrAddWarehousing: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'returnId',
}}
columns={columns}
currentRef={ref}
......
......@@ -44,7 +44,7 @@ const ReturnPrConfirm: React.FC = () => {
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/afterService/returnManage/returnPrConfirm/detail?id=${record.id}`}
url={`/memberCenter/afterService/returnManage/returnPrConfirm/detail?id=${record.returnId}`}
>
{text}
</EyePreview>
......@@ -97,7 +97,7 @@ const ReturnPrConfirm: React.FC = () => {
<>
<Button
type="link"
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPrConfirm/verify`)}
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPrConfirm/verify?id=${record.returnId}`)}
>
提交审核
</Button>
......@@ -168,7 +168,7 @@ const ReturnPrConfirm: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'returnId',
}}
columns={columns}
currentRef={ref}
......
......@@ -47,7 +47,7 @@ const ReturnPrReceived: React.FC = () => {
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/afterService/returnManage/returnPrReceived/detail?id=${record.id}`}
url={`/memberCenter/afterService/returnManage/returnPrReceived/detail?id=${record.returnId}`}
>
{text}
</EyePreview>
......@@ -111,7 +111,7 @@ const ReturnPrReceived: React.FC = () => {
<>
<Button
type="link"
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPrReceived/verify`)}
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPrReceived/verify?id=${record.returnId}`)}
>
退货发货
</Button>
......@@ -193,7 +193,7 @@ const ReturnPrReceived: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'returnId',
}}
columns={columns}
currentRef={ref}
......
......@@ -44,7 +44,7 @@ const ReturnPrReturn: React.FC = () => {
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/afterService/returnManage/returnPrReturn/detail?id=${record.id}`}
url={`/memberCenter/afterService/returnManage/returnPrReturn/detail?id=${record.returnId}`}
>
{text}
</EyePreview>
......@@ -102,7 +102,7 @@ const ReturnPrReturn: React.FC = () => {
<>
<Button
type="link"
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPrReturn/verify`)}
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPrReturn/verify?id=${record.returnId}`)}
>
提交审核
</Button>
......@@ -184,7 +184,7 @@ const ReturnPrReturn: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'returnId',
}}
columns={columns}
currentRef={ref}
......
......@@ -44,7 +44,7 @@ const ReturnPrSubmit: React.FC = () => {
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/afterService/returnManage/returnPrSubmit/detail?id=${record.id}`}
url={`/memberCenter/afterService/returnManage/returnPrSubmit/detail?id=${record.returnId}`}
>
{text}
</EyePreview>
......@@ -97,7 +97,7 @@ const ReturnPrSubmit: React.FC = () => {
<>
<Button
type="link"
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPrSubmit/verify`)}
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPrSubmit/verify?id=${record.returnId}`)}
>
提交审核
</Button>
......@@ -168,7 +168,7 @@ const ReturnPrSubmit: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'returnId',
}}
columns={columns}
currentRef={ref}
......
......@@ -43,7 +43,7 @@ const ReturnQuery: React.FC = () => {
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/afterService/returnManage/returnQuery/detail?id=${record.id}`}
url={`/memberCenter/afterService/returnManage/returnQuery/detail?id=${record.returnId}`}
>
{text}
</EyePreview>
......@@ -152,7 +152,7 @@ const ReturnQuery: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: 'returnId',
}}
columns={columns}
currentRef={ref}
......
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