Commit d1370cdf authored by Bill's avatar Bill

平台结算等接口

parent b879f033
......@@ -35,6 +35,18 @@ const router = {
component: '@/pages/platformSettlement/receipt/info',
hidePageHeader: true,
hideInMenu: true,
},
// 代收账款结算列表
{
path: '/balanced/accountReceivable',
name: 'accountReceivableList',
component: '@/pages/platformSettlement/accountReceivable',
},
// 代收账款结算明细
{
path: '/balanced/accountReceivable/detail',
name: 'accountReceivableDetail',
component: '@/pages/platformSettlement/accountReceivable/info',
}
]
}
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-08-04 15:05:52
* @LastEditors: Please set LastEditors
* @LastEditTime: 2020-10-22 15:46:18
* @LastEditTime: 2020-10-22 18:53:15
*/
import utils from '@/utils'
import menu from '../en-US/menu'
......@@ -175,7 +175,8 @@ export default {
'menu.balanced.corporateAccount': '对公账号配置',
'menu.balanced.receipt': '发票管理',
'menu.balanced.receiptAdd': '新建发票',
'menu.balanced.receiptDetail': '发票详情'
'menu.balanced.receiptDetail': '发票详情',
'menu.balanced.accountReceivableList': '代收账款结算',
'menu.balanced.accountReceivableDetail': '代收账款明细'
}
// export default utils.transformDataPre(data, 'menu')
/*
* @Author: Bill
* @Date: 2020-10-20 11:04:07
* @Description: 应付账款结算
*/
import React, { useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card, Button, Modal, DatePicker, Tag, Space } from 'antd';
import NiceForm from '@/components/NiceForm';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ISchema, createFormActions } from '@formily/antd';
import { StandardTable } from 'god';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { schema } from './schema';
import ModalContainer from '../components/ModalContainer';
import ConfirmAccount from '../components/ConfirmAccount';
import Voucher from '../components/Voucher';
import UploadPayVoucher from '../components/UploadPayVoucher';
const formActions = createFormActions();
const SettlementList = () => {
const ref = useRef<any>({})
const fetchListData = async (params) => {
return {
data: [{id: 1}],
totalCount: 1
}
}
const columns = [
{title: '结算单号', dataIndex: 'num'},
{title: '结算日期', dataIndex: 'num'},
{title: '结算方式', dataIndex: 'num'},
{title: '总单数', dataIndex: 'num'},
{title: '代收金额', dataIndex: 'num'},
{title: '佣金', dataIndex: 'num'},
{title: '结算金额', dataIndex: 'num'},
{title: '结算日期', dataIndex: 'num'},
{title: '支付方式', dataIndex: 'payMethod'},
{
title: '结算状态', dataIndex: 'status',
render: (text, record) => {
return (
<Tag>待对账</Tag>
)
}
},
{
title: '操作',
render: (text, record) => {
return (
<>
<ModalContainer>
{
({visible, show, cancel}) => {
return (
<>
<Modal width={400} title="确认对账完成" visible={visible} onCancel={cancel} onOk={() => handleConfirm(cancel)}>
<ConfirmAccount />
</Modal>
<div onClick={show}>确认对账完成</div>
</>
)
}
}
</ModalContainer>
<ModalContainer>
{
({visible, show, cancel}) => {
return (
<>
<Modal width={548} title="查看付款凭证" onCancel={cancel} visible={visible} footer={null}>
<Voucher />
</Modal>
<div onClick={show}>查看付款凭证</div>
</>
)
}
}
</ModalContainer>
<ModalContainer>
{
({visible, show, cancel}) => {
return (
<>
<Modal width={548} title="上传付款凭证" onCancel={cancel} visible={visible}
footer={(
<Space>
<Button>取消</Button>
<Button>确认未到款</Button>
<Button>确认到款</Button>
</Space>
)}
>
<UploadPayVoucher />
</Modal>
<div onClick={show}>上传付款凭证</div>
</>
)
}
}
</ModalContainer>
</>
)
}
}
]
/**
* 确认对账
* @param cancel 关闭回调函数
*/
const handleConfirm = (cancel) => {
console.log(123)
cancel();
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
components={{DatePicker}}
actions={formActions}
expressionScope={{}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.name', FORM_FILTER_PATH);
// useAsyncInitSelect(
// ['innerStatus', 'outerStatus'],
// fetchSelectOptions,
// );
}}
schema={schema}
onSubmit={values => ref.current.reload(values)}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default SettlementList
/*
* @Author: Bill
* @Date: 2020-10-20 10:54:00
* @Description: 积分结算详情页
*/
import React, { useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card, PageHeader, Descriptions, Button} from 'antd';
import { history } from 'umi';
import AvatarWrap from '@/components/AvatarWrap';
import NiceForm from '@/components/NiceForm';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ISchema, createFormActions } from '@formily/antd';
import { StandardTable } from 'god';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { detailSchema } from './schema'
const formActions = createFormActions();
const columns = [
{title: '单据号', dataIndex: 'no'},
{title: '单据摘要', dataIndex: 'desc'},
{title: '单据类型', dataIndex: 'type'},
{title: '单据时间', dataIndex: 'time'},
{title: '总箱数', dataIndex: 'box'},
{title: '总重量', dataIndex: 'weight'},
{title: '总体积', dataIndex: 'volumn'},
{title: '接单金额', dataIndex: 'price'},
{title: '支付时间', dataIndex: 'payTime'},
{title: '结算金额', dataIndex: 'payPrice'},
]
const logisticsDetail: React.FC = () => {
const ref = useRef<any>({});
const fetchListData = async (params) => {
return {}
}
return (
<PageHeaderWrapper
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
aloneTxt: '单',
name: "结算单号:"
}}
extra={(
<span style={{ fontSize: 12, fontWeight: 'normal' }}>{"TPTY12"}</span>
)}
/>
}
>
<Descriptions
column={3}
style={{
padding: '0 32px',
}}
>
<Descriptions.Item label="通知单摘要">{"进口头层黄牛皮荔枝纹"}</Descriptions.Item>
<Descriptions.Item label="供应会员:">{"广州白马皮具交易中心"}</Descriptions.Item>
<Descriptions.Item label="单据时间:">{"2020-09-09 12:58:25"}</Descriptions.Item>
<Descriptions.Item label="通知单来源:">{"订单加工"}</Descriptions.Item>
<Descriptions.Item label="外部状态:">{"以完成通知单"}</Descriptions.Item>
<Descriptions.Item label="内部状态:">{"审核通过"}</Descriptions.Item>
</Descriptions>
</PageHeader>
</>
}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
actions={formActions}
expressionScope={{
exportBtn: (
<div>
<Button>导出</Button>
</div>
)
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.topLayout.search', FORM_FILTER_PATH);
// useAsyncInitSelect(
// ['innerStatus', 'outerStatus'],
// fetchSelectOptions,
// );
}}
schema={detailSchema}
onSubmit={values => ref.current.reload(values)}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default logisticsDetail
\ No newline at end of file
/*
* @Author: Bill
* @Date: 2020-10-22 09:52:10
* @Description: 应收账款结算 schema集合
*/
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ISchema, createFormActions } from '@formily/antd';
/**
* 应收账款 index.tsx 列表页schema
*/
export const schema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
tip: '输入通知单号、通知单摘要进行搜索',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
full: true,
autoRow: true,
columns: 6,
},
properties: {
startTime: {
type: 'string',
'x-component': 'DatePicker',
'x-component-props': {
allowClear: true
}
},
endTime: {
type: 'string',
'x-component': 'DatePicker',
'x-component-props': {
allowClear: true
}
},
status: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '结算状态(全部)',
allowClear: true,
},
},
// submit: {
// 'x-component': 'Submit',
// 'x-mega-props': {
// span: 1,
// },
// 'x-component-props': {
// children: '查询',
// },
// },
},
},
},
},
},
};
/**
* 应收账款管理--物流单结算明细详情, 生产通知单结算明细
*/
export const detailSchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
topLayout: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
grid: true,
},
properties: {
ctl: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{exportBtn}}',
},
},
search: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
colStyle: {
marginLeft: 20,
},
},
properties: {
orderTime: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '下单时间(全部)',
allowClear: true,
},
},
payTime: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '支付时间(全部)',
allowClear: true,
},
},
// submit: {
// 'x-component': 'Submit',
// 'x-mega-props': {
// span: 1,
// },
// 'x-component-props': {
// children: '查询',
// },
// },
},
},
},
},
},
};
\ No newline at end of file
......@@ -6,7 +6,7 @@
import React from 'react';
import styles from './index.less'
import image_icon from '@/assets/imgs/image_icon.png';
import image_icon from '@/asserts/image_icon.png';
const Voucher = () => {
return (
......
......@@ -129,6 +129,7 @@ const Info: React.FC = () => {
const handleSubmit = (value) => {
console.log(value);
const serviceActions = isAdd
? PublicApi.postSettleAccountsPlatformConfigAddPlatformInvoice
: PublicApi.postSettleAccountsPlatformConfigUpdatePlatformInvoice
......
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