Commit a18d32d0 authored by Bill's avatar Bill

修改结算以及首页

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