Commit 09ee4aaa authored by XieZhiXiong's avatar XieZhiXiong

删除不必要的代码

parent f918fd14
......@@ -45,6 +45,24 @@ a {
}
}
::-webkit-scrollbar {
height: 8px;
width: 6px;
background: #f0f2f5;
border-radius: 5px;
}
::-webkit-scrollbar-button {
display: none;
}
::-webkit-scrollbar-thumb {
width: 8px;
min-height: 15px;
background: rgba(0,0,0,.2);
border-radius: 5px;
}
.tb_bg {
background-color: #FAFBFC;
}
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 09:54:04
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-20 14:43:15
* @LastEditTime: 2020-11-25 15:25:52
* @Description: 换货收货地址
*/
import React from 'react';
......@@ -19,6 +19,7 @@ const modalFormActions = createFormActions();
const {
onFieldValueChange$,
onFieldInputChange$,
onFormInit$,
} = FormEffectHooks;
export interface Values {
......@@ -105,6 +106,13 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
<p>{deliveryAddress.fullAddress || ''}</p>
</div>
);
const ShippingAddress = (
<div>
<p>{shippingAddress.name || ''} / {shippingAddress.phone || ''}</p>
<p>{shippingAddress.fullAddress || ''}</p>
</div>
);
return (
<MellowCard
......@@ -119,6 +127,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
}}
expressionScope={{
Address,
ShippingAddress,
}}
effects={($, { setFieldState, getFieldValue }) => {
useAsyncSelect('*(shippingAddress,pickupAddress)', fetchShipperAddress, ['label', 'value']);
......@@ -128,18 +137,31 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
// 联动配送方式
onFieldValueChange$('deliveryType').subscribe(fieldState => {
const { name, value } = fieldState;
switch (value) {
// 物流
case 1: {
linkage.show('shippingAddress');
linkage.hide('pickupAddress');
if (isEdit) {
linkage.show('shippingAddress');
linkage.hide('pickupAddress');
} else {
linkage.hide('*(shippingAddress,pickupAddress)');
linkage.show('shippingAddressShow');
}
break;
};
// 自提
case 2: {
linkage.hide('shippingAddress');
linkage.show('pickupAddress');
if (isEdit) {
linkage.hide('shippingAddress');
linkage.show('pickupAddress');
} else {
setFieldState('shippingAddressShow', fieldState => {
fieldState.title = '换货自提地址'
});
linkage.hide('*(shippingAddress,pickupAddress)');
linkage.show('shippingAddressShow');
}
break;
};
// 无需物流
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-09 15:56:35
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-20 14:54:37
* @LastEditTime: 2020-11-25 15:19:36
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -32,7 +32,7 @@ export const schema: ISchema = {
},
},
deliveryAddress: {
type: 'string',
type: 'object',
title: '换货收货地址',
'x-component': 'Children',
'x-component-props': {
......@@ -73,6 +73,15 @@ export const schema: ISchema = {
},
],
},
shippingAddressShow: {
type: 'object',
title: '换货发货地址',
visible: false,
'x-component': 'Children',
'x-component-props': {
children: '{{ShippingAddress}}',
},
},
},
},
},
......
......@@ -31,15 +31,17 @@ const OuterCirculation: React.FC<OuterCirculation> = ({
<MellowCard
title="外部流转"
>
{(steps && steps.length > 0) ? (
<Steps style={{ marginTop: 30 }} progressDot current={current}>
{steps.map((item, index) => (
<Steps.Step key={index} title={item.title} description={item.description} />
))}
</Steps>
) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
)}
<div className={styles.steps}>
{(steps && steps.length > 0) ? (
<Steps style={{ marginTop: 30 }} progressDot current={current}>
{steps.map((item, index) => (
<Steps.Step key={index} title={item.title} description={item.description} />
))}
</Steps>
) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
)}
</div>
</MellowCard>
);
};
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 09:54:04
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-20 15:40:21
* @LastEditTime: 2020-11-25 15:05:45
* @Description: 退货地址信息
*/
import React from 'react';
......@@ -19,6 +19,7 @@ const modalFormActions = createFormActions();
const {
onFieldValueChange$,
onFieldInputChange$,
onFormInit$,
} = FormEffectHooks;
export interface Values {
......@@ -105,6 +106,13 @@ const ReturnAddressInfo: React.FC<ReturnAddressInfo> = ({
<p>{shippingAddress.fullAddress || ''}</p>
</div>
);
const DeliveryAddress = (
<div>
<p>{deliveryAddress.name || ''} / {deliveryAddress.phone || ''}</p>
<p>{deliveryAddress.fullAddress || ''}</p>
</div>
);
return (
<MellowCard
......@@ -121,6 +129,16 @@ const ReturnAddressInfo: React.FC<ReturnAddressInfo> = ({
const linkage = useLinkageUtils();
onFormInit$().subscribe(() => {
if (isEdit) {
linkage.show('deliveryAddress');
linkage.hide('deliveryAddresShow');
} else {
linkage.hide('deliveryAddress');
linkage.show('deliveryAddresShow');
}
});
// 联动配送方式
onFieldValueChange$('deliveryType').subscribe(fieldState => {
const { name, value } = fieldState;
......@@ -167,6 +185,7 @@ const ReturnAddressInfo: React.FC<ReturnAddressInfo> = ({
}}
expressionScope={{
Address,
DeliveryAddress,
}}
editable={isEdit}
actions={modalFormActions}
......
......@@ -49,7 +49,7 @@ export const schema: ISchema = {
],
},
shippingAddress: {
type: 'string',
type: 'object',
title: '退货发货地址',
'x-component': 'Children',
'x-component-props': {
......@@ -57,13 +57,21 @@ export const schema: ISchema = {
},
},
pickupAddress: {
type: 'string',
type: 'object',
title: '退货自提地址',
'x-component': 'Children',
'x-component-props': {
children: '{{Address}}',
},
},
deliveryAddressShow: {
type: 'object',
title: '退货收货地址',
'x-component': 'Children',
'x-component-props': {
children: '{{DeliveryAddress}}',
},
},
},
},
},
......
......@@ -374,7 +374,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Suspense fallback={null}>
<ReturnAddressInfo
deliveryAddress={{
id: 1, // 缺
id: detailInfo?.returnGoodsAddress?.receiveId,
name: detailInfo?.returnGoodsAddress?.receiveUserName,
phone: detailInfo?.returnGoodsAddress?.receiveUserTel,
fullAddress: detailInfo?.returnGoodsAddress?.receiveAddress,
......@@ -401,7 +401,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
fullAddress: detailInfo?.replaceGoodsAddress?.receiveAddress,
}}
shippingAddress={{
id: 1, // 缺
id: detailInfo?.replaceGoodsAddress?.sendId,
deliveryType: detailInfo?.replaceGoodsAddress?.deliveryType,
name: detailInfo?.replaceGoodsAddress?.sendUserName,
phone: detailInfo?.replaceGoodsAddress?.sendUserTel,
......
......@@ -19,9 +19,7 @@ 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';
......@@ -71,8 +69,6 @@ const RepairPrFinished: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type={REPAIR_OUTER_STATUS_TAG_MAP[record.outerStatus]} title={text} />
),
......@@ -81,8 +77,6 @@ const RepairPrFinished: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={REPAIR_INNER_STATUS_BADGE_MAP[record.innerStatus]} text={text} />,
},
{
......@@ -124,41 +118,6 @@ const RepairPrFinished: React.FC = () => {
});
};
// 初始化高级筛选选项
const fetchSearchItems = async () => {
const res = await PublicApi.getAsRepairGoodsPageItems();
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>
......@@ -180,10 +139,6 @@ const RepairPrFinished: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -20,9 +20,7 @@ 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';
......@@ -108,8 +106,6 @@ const RepairPrSubmit: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type={REPAIR_OUTER_STATUS_TAG_MAP[record.outerStatus]} title={text} />
),
......@@ -118,8 +114,6 @@ const RepairPrSubmit: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={REPAIR_INNER_STATUS_BADGE_MAP[record.innerStatus]} text={text} />,
},
{
......@@ -190,41 +184,6 @@ const RepairPrSubmit: React.FC = () => {
});
};
// 初始化高级筛选选项
const fetchSearchItems = async () => {
const res = await PublicApi.getAsRepairGoodsPageItems();
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 {};
};
const controllerBtns = (
<>
<Space>
......@@ -265,10 +224,6 @@ const RepairPrSubmit: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -11,9 +11,7 @@ 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';
......@@ -63,8 +61,6 @@ const RepairPr1: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type={REPAIR_OUTER_STATUS_TAG_MAP[record.outerStatus]} title={text} />
),
......@@ -73,8 +69,6 @@ const RepairPr1: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={REPAIR_INNER_STATUS_BADGE_MAP[record.innerStatus]} text={text} />,
},
{
......@@ -116,41 +110,6 @@ const RepairPr1: React.FC = () => {
});
};
// 初始化高级筛选选项
const fetchSearchItems = async () => {
const res = await PublicApi.getAsRepairGoodsPageItems();
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>
......@@ -172,10 +131,6 @@ const RepairPr1: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -11,9 +11,7 @@ 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';
......@@ -63,8 +61,6 @@ const RepairPr2: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type={REPAIR_OUTER_STATUS_TAG_MAP[record.outerStatus]} title={text} />
),
......@@ -73,8 +69,6 @@ const RepairPr2: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={REPAIR_INNER_STATUS_BADGE_MAP[record.innerStatus]} text={text} />,
},
{
......@@ -116,41 +110,6 @@ const RepairPr2: React.FC = () => {
});
};
// 初始化高级筛选选项
const fetchSearchItems = async () => {
const res = await PublicApi.getAsRepairGoodsPageItems();
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>
......@@ -172,10 +131,6 @@ const RepairPr2: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -11,9 +11,7 @@ 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';
......@@ -63,8 +61,6 @@ const RepairPrConfirm: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type={REPAIR_OUTER_STATUS_TAG_MAP[record.outerStatus]} title={text} />
),
......@@ -73,8 +69,6 @@ const RepairPrConfirm: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={REPAIR_INNER_STATUS_BADGE_MAP[record.innerStatus]} text={text} />,
},
{
......@@ -116,41 +110,6 @@ const RepairPrConfirm: React.FC = () => {
});
};
// 初始化高级筛选选项
const fetchSearchItems = async () => {
const res = await PublicApi.getAsRepairGoodsPageItems();
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>
......@@ -172,10 +131,6 @@ const RepairPrConfirm: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -11,9 +11,7 @@ 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';
......@@ -63,8 +61,6 @@ const RepairPrSubmit: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type={REPAIR_OUTER_STATUS_TAG_MAP[record.outerStatus]} title={text} />
),
......@@ -73,8 +69,6 @@ const RepairPrSubmit: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={REPAIR_INNER_STATUS_BADGE_MAP[record.innerStatus]} text={text} />,
},
{
......@@ -116,41 +110,6 @@ const RepairPrSubmit: React.FC = () => {
});
};
// 初始化高级筛选选项
const fetchSearchItems = async () => {
const res = await PublicApi.getAsRepairGoodsPageItems();
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>
......@@ -172,10 +131,6 @@ const RepairPrSubmit: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -19,9 +19,7 @@ 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';
......@@ -100,8 +98,6 @@ const ReturnPrAddDeliver: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -110,8 +106,6 @@ const ReturnPrAddDeliver: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -159,41 +153,6 @@ const ReturnPrAddDeliver: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -215,10 +174,6 @@ const ReturnPrAddDeliver: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -18,9 +18,7 @@ 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';
......@@ -86,8 +84,6 @@ const ReturnPrAddLogistics: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -96,8 +92,6 @@ const ReturnPrAddLogistics: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -145,41 +139,6 @@ const ReturnPrAddLogistics: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -201,10 +160,6 @@ const ReturnPrAddLogistics: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -19,9 +19,7 @@ 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';
......@@ -89,8 +87,6 @@ const ReturnPrConfirmBack: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -99,8 +95,6 @@ const ReturnPrConfirmBack: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -142,41 +136,6 @@ const ReturnPrConfirmBack: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -198,10 +157,6 @@ const ReturnPrConfirmBack: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-11 10:34:51
* @LastEditTime: 2020-11-25 15:48:01
* @Description: 待新增退货发货单
*/
import React, { useState, useRef } from 'react';
......@@ -19,9 +19,7 @@ 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';
......@@ -78,8 +76,6 @@ const ReturnPrConfirmFinish: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -88,8 +84,6 @@ const ReturnPrConfirmFinish: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -131,41 +125,6 @@ const ReturnPrConfirmFinish: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -187,10 +146,6 @@ const ReturnPrConfirmFinish: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -19,9 +19,7 @@ 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';
......@@ -83,8 +81,6 @@ const ReturnPrConfirmResult: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -93,8 +89,6 @@ const ReturnPrConfirmResult: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -136,41 +130,6 @@ const ReturnPrConfirmResult: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -192,10 +151,6 @@ const ReturnPrConfirmResult: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -19,9 +19,7 @@ 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';
......@@ -89,8 +87,6 @@ const ReturnPrDeliver: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -99,8 +95,6 @@ const ReturnPrDeliver: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -142,41 +136,6 @@ const ReturnPrDeliver: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -198,10 +157,6 @@ const ReturnPrDeliver: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 10:13:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-10 18:09:45
* @LastEditTime: 2020-11-25 15:41:45
* @Description: 待提交退货申请单
*/
import React, { useState, useRef } from 'react';
......@@ -26,9 +26,7 @@ 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';
......@@ -87,8 +85,6 @@ const ReturnPrSubmit: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -97,8 +93,6 @@ const ReturnPrSubmit: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -153,41 +147,6 @@ const ReturnPrSubmit: React.FC = () => {
});
};
// 初始化高级筛选选项
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 {};
};
const controllerBtns = (
<>
<Space>
......@@ -228,10 +187,6 @@ const ReturnPrSubmit: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-06 16:41:39
* @LastEditTime: 2020-11-25 15:39:32
* @Description: 退货申请单查询
*/
import React, { useState, useRef } from 'react';
......@@ -114,36 +114,36 @@ const ReturnQuery: React.FC = () => {
// 初始化高级筛选选项
const fetchSearchItems = async () => {
// const res = await PublicApi.getPayCreditApplyPageItemsByConsumer();
const res = await PublicApi.getAsReturnGoodsPageItems();
// if (res.code === 1000) {
// const { data } = res;
// const {
// outerStatusList = [],
// innerStatusList = [],
// } = data;
if (res.code === 1000) {
const { data } = res;
const {
outerStatusList = [],
innerStatusList = [],
} = data;
// const newColumns = columns.slice();
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),
// );
// 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);
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 {
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 {};
};
......
......@@ -18,9 +18,7 @@ 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';
......@@ -75,8 +73,6 @@ const ReturnPr1: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -85,8 +81,6 @@ const ReturnPr1: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -128,41 +122,6 @@ const ReturnPr1: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -184,10 +143,6 @@ const ReturnPr1: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -18,9 +18,7 @@ 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';
......@@ -75,8 +73,6 @@ const ReturnPr2: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -85,8 +81,6 @@ const ReturnPr2: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -128,41 +122,6 @@ const ReturnPr2: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -184,10 +143,6 @@ const ReturnPr2: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -19,9 +19,7 @@ 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';
......@@ -100,8 +98,6 @@ const ReturnPrAddWarehousing: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -110,8 +106,6 @@ const ReturnPrAddWarehousing: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -170,41 +164,6 @@ const ReturnPrAddWarehousing: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -226,10 +185,6 @@ const ReturnPrAddWarehousing: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -18,9 +18,7 @@ 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';
......@@ -75,8 +73,6 @@ const ReturnPrConfirm: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -85,8 +81,6 @@ const ReturnPrConfirm: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -128,41 +122,6 @@ const ReturnPrConfirm: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -184,10 +143,6 @@ const ReturnPrConfirm: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -19,9 +19,7 @@ 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';
......@@ -89,8 +87,6 @@ const ReturnPrReceived: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -99,8 +95,6 @@ const ReturnPrReceived: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -153,41 +147,6 @@ const ReturnPrReceived: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -209,10 +168,6 @@ const ReturnPrReceived: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 18:12:26
* @LastEditTime: 2020-11-25 15:56:53
* @Description: 退货申请单查询
*/
import React, { useState, useRef } from 'react';
......@@ -18,9 +18,7 @@ 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';
......@@ -80,8 +78,6 @@ const ReturnPrReturn: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -90,8 +86,6 @@ const ReturnPrReturn: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -144,41 +138,6 @@ const ReturnPrReturn: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -200,10 +159,6 @@ const ReturnPrReturn: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
......@@ -18,9 +18,7 @@ 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';
......@@ -75,8 +73,6 @@ const ReturnPrSubmit: React.FC = () => {
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="success" title="售后完成" />
),
......@@ -85,8 +81,6 @@ const ReturnPrSubmit: React.FC = () => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={'#6C9CEB'} text="待确认售后完成" />,
},
{
......@@ -128,41 +122,6 @@ const ReturnPrSubmit: React.FC = () => {
});
};
// 初始化高级筛选选项
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>
......@@ -184,10 +143,6 @@ const ReturnPrSubmit: React.FC = () => {
'applyNo',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSearchItems,
);
}}
schema={listSearchSchema}
/>
......
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