Commit a18d32d0 authored by Bill's avatar Bill

修改结算以及首页

parent 17db8a33
...@@ -15,6 +15,7 @@ import logo from '../../mockStatic/logo.png' ...@@ -15,6 +15,7 @@ import logo from '../../mockStatic/logo.png'
import MenuSlider from './components/MenuSlider' import MenuSlider from './components/MenuSlider'
import { getMatchMenu } from '@umijs/route-utils'; import { getMatchMenu } from '@umijs/route-utils';
import { useGlobal } from '@/models/useGlobal'; import { useGlobal } from '@/models/useGlobal';
import { MenuUnfoldOutlined, MenuFoldOutlined } from '@ant-design/icons';
export interface BasicLayoutProps extends ProLayoutProps { export interface BasicLayoutProps extends ProLayoutProps {
breadcrumbNameMap: { breadcrumbNameMap: {
...@@ -71,9 +72,13 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -71,9 +72,13 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
const [collapsed, setCollapsed] = useState(false) const [collapsed, setCollapsed] = useState(false)
const [selectedKeys, setSelectedKeys] = useState<string[] | undefined>([]); const [selectedKeys, setSelectedKeys] = useState<string[] | undefined>([]);
// 获取全局状态 // 获取全局状态
const [globalState, globalDispatch] = useGlobal() const [globalState, globalDispatch] = useGlobal();
const isHome = location.pathname === '/memberCenter/home'
const handleMenuCollapse = (payload: boolean): void => { const handleMenuCollapse = (payload: boolean): void => {
if(isHome) {
return ;
}
setCollapsed(payload) setCollapsed(payload)
if (payload) { if (payload) {
setOpenKeys([]) setOpenKeys([])
...@@ -131,17 +136,24 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -131,17 +136,24 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
}, [currentRouter, collapsed]) }, [currentRouter, collapsed])
useLayoutEffect(() => { useLayoutEffect(() => {
if(location.pathname === '/memberCenter/home') { if(isHome) {
setCollapsed(true) setCollapsed(true)
} else { } else {
setCollapsed(false); setCollapsed(false);
} }
}, [location.pathname]) }, [location.pathname])
const prolayoutStyle = isHome
? {
minHeight: '100vh',
minWidth: '1280px'
}
: {}
return ( return (
<ProLayout <ProLayout
pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href} pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href}
style={{ minHeight: '100vh', minWidth: "1500px" }} style={prolayoutStyle}
logo={logo} logo={logo}
formatMessage={formatMessage} formatMessage={formatMessage}
menuHeaderRender={(logoDom, titleDom) => ( menuHeaderRender={(logoDom, titleDom) => (
...@@ -151,6 +163,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -151,6 +163,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
</Link> </Link>
)} )}
collapsed={collapsed} collapsed={collapsed}
collapsedButtonRender={(flag) => (isHome ? null : flag ? <MenuUnfoldOutlined /> : <MenuFoldOutlined/>) }
onCollapse={handleMenuCollapse} onCollapse={handleMenuCollapse}
disableContentMargin={currentRouter?.noMargin !== undefined} disableContentMargin={currentRouter?.noMargin !== undefined}
breadcrumbRender={(routers = []) => [ breadcrumbRender={(routers = []) => [
......
...@@ -16,7 +16,7 @@ import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'; ...@@ -16,7 +16,7 @@ import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { schema } from './schema'; import { schema } from './schema';
import StatusTag from '../../components/StatusTag'; import StatusTag from '../../components/StatusTag';
import StatusActions from '../../components/StatusActions'; import StatusActions from '../../components/StatusActions';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import { Moment } from 'moment'; import { Moment } from 'moment';
import { payStatus } from '../../common'; import { payStatus } from '../../common';
...@@ -35,15 +35,15 @@ interface SearchParams { ...@@ -35,15 +35,15 @@ interface SearchParams {
status?: number, status?: number,
current: number, current: number,
pageSize: number, pageSize: number,
} }
const SettlementList = () => { const SettlementList = () => {
const ref = useRef<any>({}) const ref = useRef<any>({})
/** /**
* 分页查询 * 分页查询
* @param {params: SearchParams} * @param {params: SearchParams}
*/ */
const fetchListData = async (params: any) => { const fetchListData = async (params: any) => {
const searchParams = { const searchParams = {
...@@ -57,7 +57,7 @@ const SettlementList = () => { ...@@ -57,7 +57,7 @@ const SettlementList = () => {
} }
const columns = [ const columns = [
{ {
title: '结算单号', title: '结算单号',
dataIndex: 'settlementNo', dataIndex: 'settlementNo',
render: (text, record) => { render: (text, record) => {
const prefix = `/memberCenter/balance/accountsPayable/settlementList/`; const prefix = `/memberCenter/balance/accountsPayable/settlementList/`;
...@@ -71,7 +71,7 @@ const SettlementList = () => { ...@@ -71,7 +71,7 @@ const SettlementList = () => {
}, },
{title: '结算日期', dataIndex: 'settlementDate'}, {title: '结算日期', dataIndex: 'settlementDate'},
{title: '结算方式', dataIndex: 'settlementWayName'}, {title: '结算方式', dataIndex: 'settlementWayName'},
{title: '结算方', dataIndex: 'settlementName'}, {title: '结算方', dataIndex: 'settlementName'},
{title: '结算单据', dataIndex: 'orderTypeName'}, {title: '结算单据', dataIndex: 'orderTypeName'},
{title: '总单数', dataIndex: 'totalCount'}, {title: '总单数', dataIndex: 'totalCount'},
{title: '结算金额', dataIndex: 'amount'}, {title: '结算金额', dataIndex: 'amount'},
...@@ -91,8 +91,8 @@ const SettlementList = () => { ...@@ -91,8 +91,8 @@ const SettlementList = () => {
title: '操作', title: '操作',
render: (text: string, record: any) => { render: (text: string, record: any) => {
return ( return (
<StatusActions <StatusActions
status={record.status <= 2 ? record.status : 4 } status={record.status <= 2 ? record.status : 4 }
id={record.id} id={record.id}
excludes={[1, 3]} excludes={[1, 3]}
settlementId={record.memberId || 1} settlementId={record.memberId || 1}
...@@ -106,7 +106,7 @@ const SettlementList = () => { ...@@ -106,7 +106,7 @@ const SettlementList = () => {
/** /**
* 上传凭证 * 上传凭证
* @param params * @param params
*/ */
const handleUploadVoucher = (params: any) => { const handleUploadVoucher = (params: any) => {
console.log(params); console.log(params);
...@@ -141,7 +141,7 @@ const SettlementList = () => { ...@@ -141,7 +141,7 @@ const SettlementList = () => {
currentRef={ref} currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)} fetchTableData={(params: any) => fetchListData(params)}
controlRender={ controlRender={
<NiceForm <NiceForm
actions={formActions} actions={formActions}
components={{DatePicker}} components={{DatePicker}}
expressionScope={{}} expressionScope={{}}
...@@ -159,6 +159,10 @@ const SettlementList = () => { ...@@ -159,6 +159,10 @@ const SettlementList = () => {
}} }}
schema={schema} schema={schema}
onSubmit={handleSearch} onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
}}
/> />
} }
/> />
......
...@@ -22,8 +22,8 @@ export const schema: ISchema = { ...@@ -22,8 +22,8 @@ export const schema: ISchema = {
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '搜索(结算方)', placeholder: '搜索(结算方)',
align: 'flex-left', align: 'flex-left',
// tip: '输入通知单号、通知单摘要进行搜索', // tip: '输入通知单号、通知单摘要进行搜索',
}, },
}, },
[FORM_FILTER_PATH]: { [FORM_FILTER_PATH]: {
...@@ -40,14 +40,17 @@ export const schema: ISchema = { ...@@ -40,14 +40,17 @@ export const schema: ISchema = {
type: 'string', type: 'string',
'x-component': 'DatePicker', 'x-component': 'DatePicker',
'x-component-props': { 'x-component-props': {
allowClear: true allowClear: true,
placeholder: "结算时间(开始时间)"
} }
}, },
endTime: { endTime: {
type: 'string', type: 'string',
'x-component': 'DatePicker', 'x-component': 'DatePicker',
'x-component-props': { 'x-component-props': {
allowClear: true allowClear: true,
placeholder: "结算时间(结束时间)"
} }
}, },
status: { status: {
...@@ -61,8 +64,8 @@ export const schema: ISchema = { ...@@ -61,8 +64,8 @@ export const schema: ISchema = {
], ],
default: 0, default: 0,
'x-component-props': { 'x-component-props': {
placeholder: '结算状态(全部)', placeholder: '结算状态(全部)',
allowClear: true, allowClear: true,
}, },
}, },
orderType: { orderType: {
...@@ -74,8 +77,8 @@ export const schema: ISchema = { ...@@ -74,8 +77,8 @@ export const schema: ISchema = {
], ],
default: 0, default: 0,
'x-component-props': { 'x-component-props': {
placeholder: '结算单据(全部)', placeholder: '结算单据(全部)',
allowClear: true, allowClear: true,
}, },
}, },
submit: { submit: {
......
...@@ -25,7 +25,7 @@ const RangePicker = DatePicker.RangePicker; ...@@ -25,7 +25,7 @@ const RangePicker = DatePicker.RangePicker;
const formActions = createFormActions(); const formActions = createFormActions();
const columns = [ const columns = [
{ {
title: '订单号/类型', title: '订单号/类型',
dataIndex: 'orderNo', dataIndex: 'orderNo',
render: (text, record: any) => { render: (text, record: any) => {
return ( return (
...@@ -51,8 +51,8 @@ const columns = [ ...@@ -51,8 +51,8 @@ const columns = [
{title: '订单类型',dataIndex: 'orderTypeName'}, {title: '订单类型',dataIndex: 'orderTypeName'},
{title: '单据总额', dataIndex: 'orderAmount'}, {title: '单据总额', dataIndex: 'orderAmount'},
{ {
title: '支付批次/环节', title: '支付批次/环节',
dataIndex: 'batch', dataIndex: 'batch',
render: (text, record) => { render: (text, record) => {
return ( return (
<div> <div>
...@@ -65,7 +65,7 @@ const columns = [ ...@@ -65,7 +65,7 @@ const columns = [
{title: '支付金额', dataIndex: 'payAmount'}, {title: '支付金额', dataIndex: 'payAmount'},
{title: '支付时间', dataIndex: 'payTime'}, {title: '支付时间', dataIndex: 'payTime'},
{ {
title: '开票状态', title: '开票状态',
dataIndex: 'invoiceStatus', dataIndex: 'invoiceStatus',
filters: [ filters: [
{ text: '未开票', value: 0 }, { text: '未开票', value: 0 },
...@@ -81,7 +81,7 @@ const columns = [ ...@@ -81,7 +81,7 @@ const columns = [
} }
}, },
{ {
title: '支付状态', title: '支付状态',
dataIndex: 'status', dataIndex: 'status',
filters: [ filters: [
{ text: '未支付', value: '未支付' }, { text: '未支付', value: '未支付' },
...@@ -96,7 +96,7 @@ const columns = [ ...@@ -96,7 +96,7 @@ const columns = [
} }
}, },
{ {
title: '操作', title: '操作',
render: (text, record) => { render: (text, record) => {
return ( return (
<> <>
...@@ -105,13 +105,13 @@ const columns = [ ...@@ -105,13 +105,13 @@ const columns = [
({visible, show, cancel}) => { ({visible, show, cancel}) => {
return ( return (
<> <>
<InvoiceCreate <InvoiceCreate
id={record.id} id={record.id}
type={record.invoiceStatus} type={record.invoiceStatus}
title="开具发票" title="开具发票"
width={800} width={800}
visible={visible} visible={visible}
onCancel={cancel} onCancel={cancel}
refresh={() => formActions.submit()} refresh={() => formActions.submit()}
/> />
<div className={styles.text} onClick={show}>{record.invoiceStatus == 1 ? '查看' : '开票'}</div> <div className={styles.text} onClick={show}>{record.invoiceStatus == 1 ? '查看' : '开票'}</div>
...@@ -131,7 +131,7 @@ const SettlementList = () => { ...@@ -131,7 +131,7 @@ const SettlementList = () => {
/** /**
* 获取开票管理列表 * 获取开票管理列表
* @param params * @param params
*/ */
const fetchListData = async (params) => { const fetchListData = async (params) => {
// /settle/accounts/member/settlement/pageReceiptInvoice // /settle/accounts/member/settlement/pageReceiptInvoice
...@@ -159,7 +159,7 @@ const SettlementList = () => { ...@@ -159,7 +159,7 @@ const SettlementList = () => {
currentRef={ref} currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)} fetchTableData={(params: any) => fetchListData(params)}
controlRender={ controlRender={
<NiceForm <NiceForm
components={{RangePicker}} components={{RangePicker}}
actions={formActions} actions={formActions}
expressionScope={{ expressionScope={{
...@@ -179,10 +179,11 @@ const SettlementList = () => { ...@@ -179,10 +179,11 @@ const SettlementList = () => {
useAsyncSelect( useAsyncSelect(
'payStatus', 'payStatus',
fetchOptions(PublicApi.getSettleAccountsCommonGetPayStatus), fetchOptions(PublicApi.getSettleAccountsCommonGetPayStatus),
); );
}} }}
schema={schema} schema={schema}
onSubmit={reload} onSubmit={reload}
/> />
} }
/> />
......
...@@ -39,7 +39,7 @@ const SettlementList = () => { ...@@ -39,7 +39,7 @@ const SettlementList = () => {
} }
const columns = [ const columns = [
{ {
title: '结算单号', title: '结算单号',
dataIndex: 'settlementNo', dataIndex: 'settlementNo',
render: (text, record) => { render: (text, record) => {
const prefix = `/memberCenter/balance/accountsReceivable/settlementList/`; const prefix = `/memberCenter/balance/accountsReceivable/settlementList/`;
...@@ -53,7 +53,7 @@ const SettlementList = () => { ...@@ -53,7 +53,7 @@ const SettlementList = () => {
}, },
{title: '结算日期', dataIndex: 'settlementDate'}, {title: '结算日期', dataIndex: 'settlementDate'},
{title: '结算方式', dataIndex: 'settlementWayName'}, {title: '结算方式', dataIndex: 'settlementWayName'},
{title: '付款方', dataIndex: 'payName'}, {title: '付款方', dataIndex: 'payName'},
{title: '结算单据', dataIndex: 'orderTypeName'}, {title: '结算单据', dataIndex: 'orderTypeName'},
{title: '总单数', dataIndex: 'totalCount'}, {title: '总单数', dataIndex: 'totalCount'},
{title: '结算金额', dataIndex: 'amount'}, {title: '结算金额', dataIndex: 'amount'},
...@@ -73,11 +73,11 @@ const SettlementList = () => { ...@@ -73,11 +73,11 @@ const SettlementList = () => {
title: '操作', title: '操作',
render: (text, record) => { render: (text, record) => {
return ( return (
<StatusActions <StatusActions
excludes={[2]} excludes={[2]}
id={record.id} id={record.id}
type={RECEIABLE_BENEFICIARY} type={RECEIABLE_BENEFICIARY}
status={record.status} status={record.status}
settlementDate={record.settlementDate} settlementDate={record.settlementDate}
payName={record.payName} payName={record.payName}
handleReconciledComfirm={handleConfirm} handleReconciledComfirm={handleConfirm}
...@@ -105,7 +105,7 @@ const SettlementList = () => { ...@@ -105,7 +105,7 @@ const SettlementList = () => {
/** /**
* 确认未到款 * 确认未到款
* @param {onCancel:function, id: number, status: number} * @param {onCancel:function, id: number, status: number}
*/ */
const handleComfirmInCompletePayment = (params: any) => { const handleComfirmInCompletePayment = (params: any) => {
PublicApi.postSettleAccountsMemberSettlementConfirmPayProve({id: params.id, status: params.status}) PublicApi.postSettleAccountsMemberSettlementConfirmPayProve({id: params.id, status: params.status})
...@@ -119,7 +119,7 @@ const SettlementList = () => { ...@@ -119,7 +119,7 @@ const SettlementList = () => {
/** /**
* 确认到款 * 确认到款
* @param {onCancel:function, id: number, status: number} * @param {onCancel:function, id: number, status: number}
*/ */
const handleComfirmCompletePayment = (params: any) => { const handleComfirmCompletePayment = (params: any) => {
PublicApi.postSettleAccountsMemberSettlementConfirmPayProve({id: params.id, status: params.status}) PublicApi.postSettleAccountsMemberSettlementConfirmPayProve({id: params.id, status: params.status})
...@@ -152,7 +152,7 @@ const SettlementList = () => { ...@@ -152,7 +152,7 @@ const SettlementList = () => {
currentRef={ref} currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)} fetchTableData={(params: any) => fetchListData(params)}
controlRender={ controlRender={
<NiceForm <NiceForm
components={{DatePicker}} components={{DatePicker}}
actions={formActions} actions={formActions}
expressionScope={{}} expressionScope={{}}
...@@ -170,6 +170,10 @@ const SettlementList = () => { ...@@ -170,6 +170,10 @@ const SettlementList = () => {
}} }}
schema={schema} schema={schema}
onSubmit={handleSearch} onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
}}
/> />
} }
/> />
......
...@@ -45,7 +45,7 @@ interface infoType { ...@@ -45,7 +45,7 @@ interface infoType {
payName: string, // 付款方 payName: string, // 付款方
orderTypeName: string, // 结算单据类型名称 orderTypeName: string, // 结算单据类型名称
totalCount: number, // 总单数 totalCount: number, // 总单数
amount: number, // 结算金额 amount: number, // 结算金额
statusName: string // 结算状态名称 statusName: string // 结算状态名称
} }
...@@ -82,7 +82,7 @@ const logisticsDetail: React.FC = () => { ...@@ -82,7 +82,7 @@ const logisticsDetail: React.FC = () => {
const startTime = values.startTime?.format(format); const startTime = values.startTime?.format(format);
const endTime = values.endTime?.format(format); const endTime = values.endTime?.format(format);
ref.current.reload({...values, startTime, endTime}); ref.current.reload({...values, startTime, endTime});
} }
return ( return (
<PageHeaderWrapper <PageHeaderWrapper
...@@ -92,21 +92,21 @@ const logisticsDetail: React.FC = () => { ...@@ -92,21 +92,21 @@ const logisticsDetail: React.FC = () => {
style={{ padding: '0' }} style={{ padding: '0' }}
onBack={() => history.goBack()} onBack={() => history.goBack()}
title={ title={
<AvatarWrap <AvatarWrap
info={{ info={{
aloneTxt: '单', aloneTxt: '单',
name: "结算单号:" name: "结算单号:"
}} }}
extra={( extra={(
<span style={{ fontSize: 12 }}>{infoDetail?.settlementNo}</span> <span style={{ fontSize: 12 }}>{infoDetail?.settlementNo}</span>
)} )}
/> />
} }
> >
<Descriptions <Descriptions
column={3} column={3}
style={{ style={{
padding: '0 32px', padding: '0 32px',
}} }}
> >
<Descriptions.Item label="结算日期">{infoDetail?.settlementDate}</Descriptions.Item> <Descriptions.Item label="结算日期">{infoDetail?.settlementDate}</Descriptions.Item>
...@@ -129,7 +129,7 @@ const logisticsDetail: React.FC = () => { ...@@ -129,7 +129,7 @@ const logisticsDetail: React.FC = () => {
currentRef={ref} currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)} fetchTableData={(params: any) => fetchListData(params)}
controlRender={ controlRender={
<NiceForm <NiceForm
components={{RangePicker}} components={{RangePicker}}
actions={formActions} actions={formActions}
expressionScope={{ expressionScope={{
...@@ -148,6 +148,10 @@ const logisticsDetail: React.FC = () => { ...@@ -148,6 +148,10 @@ const logisticsDetail: React.FC = () => {
}} }}
schema={logisticsDetailSchema} schema={logisticsDetailSchema}
onSubmit={handleSearch} onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
}}
/> />
} }
/> />
...@@ -157,4 +161,4 @@ const logisticsDetail: React.FC = () => { ...@@ -157,4 +161,4 @@ const logisticsDetail: React.FC = () => {
) )
} }
export default logisticsDetail export default logisticsDetail
\ No newline at end of file
...@@ -152,6 +152,12 @@ const ProductNoticeSettlementDetail: React.FC = () => { ...@@ -152,6 +152,12 @@ const ProductNoticeSettlementDetail: React.FC = () => {
}} }}
schema={detailSchema} schema={detailSchema}
onSubmit={handleSearch} onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
formActions.setFieldValue('receiveStartTime', null);
formActions.setFieldValue('receiveEndTime', null);
}}
/> />
} }
/> />
......
...@@ -22,8 +22,8 @@ export const schema: ISchema = { ...@@ -22,8 +22,8 @@ export const schema: ISchema = {
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '搜索(付款方)', placeholder: '搜索(付款方)',
align: 'flex-left', align: 'flex-left',
// tip: '输入通知单号、通知单摘要进行搜索', // tip: '输入通知单号、通知单摘要进行搜索',
}, },
}, },
[FORM_FILTER_PATH]: { [FORM_FILTER_PATH]: {
...@@ -40,14 +40,17 @@ export const schema: ISchema = { ...@@ -40,14 +40,17 @@ export const schema: ISchema = {
type: 'string', type: 'string',
'x-component': 'DatePicker', 'x-component': 'DatePicker',
'x-component-props': { 'x-component-props': {
allowClear: true allowClear: true,
placeholder: '结算日期(开始时间)'
} }
}, },
endTime: { endTime: {
type: 'string', type: 'string',
'x-component': 'DatePicker', 'x-component': 'DatePicker',
'x-component-props': { 'x-component-props': {
allowClear: true allowClear: true,
placeholder: '结算日期(开始时间)'
} }
}, },
status: { status: {
...@@ -61,8 +64,8 @@ export const schema: ISchema = { ...@@ -61,8 +64,8 @@ export const schema: ISchema = {
], ],
default: 0, default: 0,
'x-component-props': { 'x-component-props': {
placeholder: '结算状态(全部)', placeholder: '结算状态(全部)',
allowClear: true, allowClear: true,
}, },
}, },
orderType: { orderType: {
...@@ -74,8 +77,8 @@ export const schema: ISchema = { ...@@ -74,8 +77,8 @@ export const schema: ISchema = {
], ],
default: 0, default: 0,
'x-component-props': { 'x-component-props': {
placeholder: '结算单据(全部)', placeholder: '结算单据(全部)',
allowClear: true, allowClear: true,
}, },
}, },
submit: { submit: {
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2020-10-20 09:37:53 * @Date: 2020-10-20 09:37:53
* @Description: 平台代收账款结算 * @Description: 平台代收账款结算
*/ */
import React, { useRef } from 'react'; import React, { useRef } from 'react';
...@@ -39,11 +39,11 @@ const AccountReceivable = () => { ...@@ -39,11 +39,11 @@ const AccountReceivable = () => {
} }
const columns = [ const columns = [
{ {
title: '结算单号', title: '结算单号',
dataIndex: 'settlementNo', dataIndex: 'settlementNo',
render: (text, record) => { render: (text, record) => {
return ( return (
<EyePreview <EyePreview
url={`/memberCenter/balance/platformSettlement/accountReceivable/detail?id=${record.id}`} url={`/memberCenter/balance/platformSettlement/accountReceivable/detail?id=${record.id}`}
>{record.settlementNo}</EyePreview> >{record.settlementNo}</EyePreview>
) )
...@@ -71,11 +71,11 @@ const AccountReceivable = () => { ...@@ -71,11 +71,11 @@ const AccountReceivable = () => {
title: '操作', title: '操作',
render: (text, record) => { render: (text, record) => {
return ( return (
<StatusActions <StatusActions
excludes={[2]} excludes={[2]}
id={record.id} id={record.id}
type={PLATFORM_BENEFICIARY} type={PLATFORM_BENEFICIARY}
status={record.status} status={record.status}
settlementDate={record.settlementDate} settlementDate={record.settlementDate}
payName={"平台"} payName={"平台"}
handleReconciledComfirm={handleConfirm} handleReconciledComfirm={handleConfirm}
...@@ -87,7 +87,7 @@ const AccountReceivable = () => { ...@@ -87,7 +87,7 @@ const AccountReceivable = () => {
} }
] ]
/** /**
* 确认对账 * 确认对账
* @param {cancel: function, id: number} cancel 为关闭回调函数 * @param {cancel: function, id: number} cancel 为关闭回调函数
...@@ -105,7 +105,7 @@ const AccountReceivable = () => { ...@@ -105,7 +105,7 @@ const AccountReceivable = () => {
/** /**
* 确认未到款 * 确认未到款
* @param {onCancel:function, id: number, status: number} * @param {onCancel:function, id: number, status: number}
*/ */
const handleComfirmInCompletePayment = (params: any) => { const handleComfirmInCompletePayment = (params: any) => {
PublicApi.postSettleAccountsPlatformSettlementConfirmPayProve({id: params.id, status: params.status}) PublicApi.postSettleAccountsPlatformSettlementConfirmPayProve({id: params.id, status: params.status})
...@@ -119,7 +119,7 @@ const AccountReceivable = () => { ...@@ -119,7 +119,7 @@ const AccountReceivable = () => {
/** /**
* 确认到款 * 确认到款
* @param {onCancel:function, id: number, status: number} * @param {onCancel:function, id: number, status: number}
*/ */
const handleComfirmCompletePayment = (params: any) => { const handleComfirmCompletePayment = (params: any) => {
///settle/accounts/platform/settlement/confirmPayProve ///settle/accounts/platform/settlement/confirmPayProve
...@@ -154,7 +154,7 @@ const AccountReceivable = () => { ...@@ -154,7 +154,7 @@ const AccountReceivable = () => {
// rowSelection={rowSelection} // rowSelection={rowSelection}
fetchTableData={(params: any) => fetchListData(params)} fetchTableData={(params: any) => fetchListData(params)}
controlRender={ controlRender={
<NiceForm <NiceForm
actions={formActions} actions={formActions}
expressionScope={{}} expressionScope={{}}
components={{DatePicker}} components={{DatePicker}}
...@@ -167,6 +167,10 @@ const AccountReceivable = () => { ...@@ -167,6 +167,10 @@ const AccountReceivable = () => {
}} }}
schema={schema} schema={schema}
onSubmit={handleSearch} onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
}}
/> />
} }
/> />
...@@ -175,4 +179,4 @@ const AccountReceivable = () => { ...@@ -175,4 +179,4 @@ const AccountReceivable = () => {
) )
} }
export default AccountReceivable export default AccountReceivable
\ No newline at end of file
...@@ -18,8 +18,8 @@ export const schema: ISchema = { ...@@ -18,8 +18,8 @@ export const schema: ISchema = {
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '搜索结算单号', placeholder: '搜索结算单号',
align: 'flex-left', align: 'flex-left',
tip: '输入 结算单号 进行搜索', tip: '输入 结算单号 进行搜索',
}, },
}, },
[FORM_FILTER_PATH]: { [FORM_FILTER_PATH]: {
...@@ -36,14 +36,16 @@ export const schema: ISchema = { ...@@ -36,14 +36,16 @@ export const schema: ISchema = {
type: 'string', type: 'string',
'x-component': 'DatePicker', 'x-component': 'DatePicker',
'x-component-props': { 'x-component-props': {
allowClear: true allowClear: true,
placeholder: '结算日期(开始时间)'
} }
}, },
endTime: { endTime: {
type: 'string', type: 'string',
'x-component': 'DatePicker', 'x-component': 'DatePicker',
'x-component-props': { 'x-component-props': {
allowClear: true allowClear: true,
placeholder: '结算日期(结束时间)'
} }
}, },
status: { status: {
...@@ -53,8 +55,8 @@ export const schema: ISchema = { ...@@ -53,8 +55,8 @@ export const schema: ISchema = {
], ],
default: 0, default: 0,
'x-component-props': { 'x-component-props': {
placeholder: '结算状态(全部)', placeholder: '结算状态(全部)',
allowClear: true, allowClear: true,
}, },
}, },
submit: { submit: {
...@@ -127,8 +129,8 @@ export const detailSchema: ISchema = { ...@@ -127,8 +129,8 @@ export const detailSchema: ISchema = {
enum: orderTime, enum: orderTime,
default: 0, default: 0,
'x-component-props': { 'x-component-props': {
placeholder: '下单时间(全部)', placeholder: '下单时间(全部)',
allowClear: true, allowClear: true,
}, },
}, },
payTime: { payTime: {
...@@ -136,8 +138,8 @@ export const detailSchema: ISchema = { ...@@ -136,8 +138,8 @@ export const detailSchema: ISchema = {
enum: payTime, enum: payTime,
default: 0, default: 0,
'x-component-props': { 'x-component-props': {
placeholder: '支付时间(全部)', placeholder: '支付时间(全部)',
allowClear: true, allowClear: true,
}, },
}, },
...@@ -155,4 +157,4 @@ export const detailSchema: ISchema = { ...@@ -155,4 +157,4 @@ export const detailSchema: ISchema = {
}, },
}, },
}, },
}; };
\ No newline at end of file
...@@ -37,11 +37,11 @@ const Integral: React.FC = () => { ...@@ -37,11 +37,11 @@ const Integral: React.FC = () => {
} }
const columns = [ const columns = [
{ {
title: '结算单号', title: '结算单号',
dataIndex: 'settlementNo', dataIndex: 'settlementNo',
render: (text, record) => { render: (text, record) => {
return ( return (
<EyePreview <EyePreview
url={`/memberCenter/balance/platformSettlement/integral/detail?id=${record.id}`} url={`/memberCenter/balance/platformSettlement/integral/detail?id=${record.id}`}
>{record.settlementNo}</EyePreview> >{record.settlementNo}</EyePreview>
) )
...@@ -52,7 +52,7 @@ const Integral: React.FC = () => { ...@@ -52,7 +52,7 @@ const Integral: React.FC = () => {
{title: '总单数', dataIndex: 'totalCount'}, {title: '总单数', dataIndex: 'totalCount'},
{title: '结算积分总数', dataIndex: 'score'}, {title: '结算积分总数', dataIndex: 'score'},
{ {
title: '兑换比率', title: '兑换比率',
dataIndex: 'ratio', dataIndex: 'ratio',
render: (text, record) => { render: (text, record) => {
return (record.ratio * 100 + "%"); return (record.ratio * 100 + "%");
...@@ -76,11 +76,11 @@ const Integral: React.FC = () => { ...@@ -76,11 +76,11 @@ const Integral: React.FC = () => {
render: (text, record) => { render: (text, record) => {
return ( return (
<> <>
<StatusActions <StatusActions
excludes={[2]} excludes={[2]}
id={record.id} id={record.id}
type={SCORE_BENEFINCIARY} type={SCORE_BENEFINCIARY}
status={record.status} status={record.status}
settlementDate={record.settlementDate} settlementDate={record.settlementDate}
payName={"平台"} payName={"平台"}
handleReconciledComfirm={handleConfirm} handleReconciledComfirm={handleConfirm}
...@@ -109,7 +109,7 @@ const Integral: React.FC = () => { ...@@ -109,7 +109,7 @@ const Integral: React.FC = () => {
/** /**
* 确认未到款 * 确认未到款
* @param {onCancel:function, id: number, status: number} * @param {onCancel:function, id: number, status: number}
*/ */
const handleComfirmInCompletePayment = (params: any) => { const handleComfirmInCompletePayment = (params: any) => {
PublicApi.postSettleAccountsPlatformScoreSettlementConfirmPayProve({id: params.id, status: params.status}) PublicApi.postSettleAccountsPlatformScoreSettlementConfirmPayProve({id: params.id, status: params.status})
...@@ -123,7 +123,7 @@ const Integral: React.FC = () => { ...@@ -123,7 +123,7 @@ const Integral: React.FC = () => {
/** /**
* 确认到款 * 确认到款
* @param {onCancel:function, id: number, status: number} * @param {onCancel:function, id: number, status: number}
*/ */
const handleComfirmCompletePayment = (params: any) => { const handleComfirmCompletePayment = (params: any) => {
PublicApi.postSettleAccountsPlatformScoreSettlementConfirmPayProve({id: params.id, status: params.status}) PublicApi.postSettleAccountsPlatformScoreSettlementConfirmPayProve({id: params.id, status: params.status})
...@@ -155,7 +155,7 @@ const Integral: React.FC = () => { ...@@ -155,7 +155,7 @@ const Integral: React.FC = () => {
currentRef={ref} currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)} fetchTableData={(params: any) => fetchListData(params)}
controlRender={ controlRender={
<NiceForm <NiceForm
actions={formActions} actions={formActions}
components={{DatePicker}} components={{DatePicker}}
expressionScope={{}} expressionScope={{}}
...@@ -168,6 +168,10 @@ const Integral: React.FC = () => { ...@@ -168,6 +168,10 @@ const Integral: React.FC = () => {
}} }}
schema={schema} schema={schema}
onSubmit={handleSearch} onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
}}
/> />
} }
/> />
...@@ -176,4 +180,4 @@ const Integral: React.FC = () => { ...@@ -176,4 +180,4 @@ const Integral: React.FC = () => {
) )
} }
export default Integral export default Integral
\ No newline at end of file
...@@ -23,8 +23,8 @@ export const schema: ISchema = { ...@@ -23,8 +23,8 @@ export const schema: ISchema = {
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '搜索', placeholder: '搜索',
align: 'flex-left', align: 'flex-left',
// tip: '输入通知单号、通知单摘要进行搜索', // tip: '输入通知单号、通知单摘要进行搜索',
}, },
}, },
[FORM_FILTER_PATH]: { [FORM_FILTER_PATH]: {
...@@ -41,14 +41,16 @@ export const schema: ISchema = { ...@@ -41,14 +41,16 @@ export const schema: ISchema = {
type: 'string', type: 'string',
'x-component': 'DatePicker', 'x-component': 'DatePicker',
'x-component-props': { 'x-component-props': {
allowClear: true allowClear: true,
placeholder: '结算日期(开始时间)'
} }
}, },
endTime: { endTime: {
type: 'string', type: 'string',
'x-component': 'DatePicker', 'x-component': 'DatePicker',
'x-component-props': { 'x-component-props': {
allowClear: true allowClear: true,
placeholder: '结算日期(结束时间)'
} }
}, },
status: { status: {
...@@ -61,8 +63,8 @@ export const schema: ISchema = { ...@@ -61,8 +63,8 @@ export const schema: ISchema = {
{label: '待完成', value: 4}, {label: '待完成', value: 4},
], ],
'x-component-props': { 'x-component-props': {
placeholder: '结算状态(全部)', placeholder: '结算状态(全部)',
allowClear: true, allowClear: true,
}, },
default: 0 default: 0
}, },
...@@ -136,8 +138,8 @@ export const detailSchema: ISchema = { ...@@ -136,8 +138,8 @@ export const detailSchema: ISchema = {
enum: orderTime, enum: orderTime,
default: 0, default: 0,
'x-component-props': { 'x-component-props': {
placeholder: '下单时间(全部)', placeholder: '下单时间(全部)',
allowClear: true, allowClear: true,
}, },
}, },
payTime: { payTime: {
...@@ -145,8 +147,8 @@ export const detailSchema: ISchema = { ...@@ -145,8 +147,8 @@ export const detailSchema: ISchema = {
enum: payTime, enum: payTime,
default: 0, default: 0,
'x-component-props': { 'x-component-props': {
placeholder: '支付时间(全部)', placeholder: '支付时间(全部)',
allowClear: true, allowClear: true,
}, },
}, },
submit: { submit: {
...@@ -163,4 +165,4 @@ export const detailSchema: ISchema = { ...@@ -163,4 +165,4 @@ export const detailSchema: ISchema = {
}, },
}, },
}, },
}; };
\ No newline at end of file
...@@ -73,6 +73,9 @@ const MemberSettle: React.FC<{}> = () => { ...@@ -73,6 +73,9 @@ const MemberSettle: React.FC<{}> = () => {
{ {
title: '操作', title: '操作',
render: (text, record) => { render: (text, record) => {
if(record.status == 1) {
return null
}
return ( return (
<Space> <Space>
<Link to={`/memberCenter/balance/settleRules/memberSettleList/edit?id=${record.id}`}>修改</Link> <Link to={`/memberCenter/balance/settleRules/memberSettleList/edit?id=${record.id}`}>修改</Link>
......
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