Commit e4a50ec9 authored by Bill's avatar Bill

结算能力页面大致完成

parent da6d156e
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
/* /*
* @Author: Bill * @Author: Bill
* @Date: 2020-10-12 09:45:20 * @Date: 2020-10-12 09:45:20
* @LastEditTime: 2020-10-19 17:27:15 * @LastEditTime: 2020-10-20 17:33:20
* @Description: 加工能力路由 * @Description: 加工能力路由
*/ */
...@@ -44,6 +44,7 @@ const HandlingRoute = { ...@@ -44,6 +44,7 @@ const HandlingRoute = {
name: 'receiptInfoAdd', name: 'receiptInfoAdd',
icon: 'smile', icon: 'smile',
component: '@/pages/balance/settleRules/receipt/info', component: '@/pages/balance/settleRules/receipt/info',
hideInMenu: true,
}, },
// 结算规则配置 -> 发票详情 // 结算规则配置 -> 发票详情
{ {
...@@ -51,6 +52,7 @@ const HandlingRoute = { ...@@ -51,6 +52,7 @@ const HandlingRoute = {
name: 'receiptInfo', name: 'receiptInfo',
icon: 'smile', icon: 'smile',
component: '@/pages/balance/settleRules/receipt/info', component: '@/pages/balance/settleRules/receipt/info',
hideInMenu: true,
}, },
// 结算规则配置 -> 会员结算策略 // 结算规则配置 -> 会员结算策略
{ {
...@@ -64,13 +66,112 @@ const HandlingRoute = { ...@@ -64,13 +66,112 @@ const HandlingRoute = {
path: '/memberCenter/balance/settleRules/memberSettleList/add', path: '/memberCenter/balance/settleRules/memberSettleList/add',
name: 'memberSettleAdd', name: 'memberSettleAdd',
icon: 'smile', icon: 'smile',
component: '@/pages/balance/settleRules/memberSettle/add' component: '@/pages/balance/settleRules/memberSettle/info'
}, },
] ]
}, },
// 平台结算管理
{
path: '/memberCenter/balance/platformSettlement',
name: 'platformSettlement',
key: 'platformSettlement',
routes: [
// 平台结算管理 -> 平台待收账款
{
path: '/memberCenter/balance/platformSettlement/accountReceivable',
name: 'accountReceivable',
icon: 'smile',
component: '@/pages/balance/platformSettlement/accountReceivable'
},
// 平台结算管理 -> 平台代收账款结算详情
{
path: '/memberCenter/balance/platformSettlement/accountReceivable/detail',
name: 'accountReceivableInfo',
icon: 'smile',
component: '@/pages/balance/platformSettlement/accountReceivable/info'
},
// 平台结算管理 -> 积分结算列表页
{
path: '/memberCenter/balance/platformSettlement/integral',
name: 'integral',
icon: 'smile',
component: '@/pages/balance/platformSettlement/integral'
},
// 平台结算管理 -> 积分结算详情页
{
path: '/memberCenter/balance/platformSettlement/integral/detail',
name: 'integralInfo',
icon: 'smile',
component: '@/pages/balance/platformSettlement/integral/info'
}
]
},
// 应付账款管理
{
path: '/memberCenter/balance/accountsPayable',
name: 'accountsPayable',
key: 'accountsPayable',
routes: [
// 应付账款管理 -> 应付账款结算列表页
{
path: '/memberCenter/balance/accountsPayable/settlementList',
name: 'settlementList',
icon: 'smile',
component: '@/pages/balance/accountsPayable/settlementList'
},
// 应付账款管理 -> 物流单结算明细
{
path: '/memberCenter/balance/accountsPayable/settlementList/logisticsDetail',
name: 'logisticsDetail',
icon: 'smile',
component: '@/pages/balance/accountsPayable/settlementList/logisticsDetail'
},
// 应付账款管理 -> 生产通知单结算明细
{
path: '/memberCenter/balance/accountsPayable/settlementList/productNoticeSettlementDetail',
name: 'productNoticeSettlementDetail',
icon: 'smile',
component: '@/pages/balance/accountsPayable/settlementList/productNoticeSettlementDetail'
}
]
},
// 应收账款管理
{
path: '/memberCenter/balance/accountsReceivable',
name: 'accountsReceivable',
key: 'accountsReceivable',
routes: [
// 应收账款管理 -> 应收账款结算列表
{
path: '/memberCenter/balance/accountsReceivable/settlementList',
name: 'settlementList',
icon: 'smile',
component: '@/pages/balance/accountsReceivable/settlementList'
},
// 应收账款管理 -> 物流单结算明细
{
path: '/memberCenter/balance/accountsReceivable/settlementList/logisticsDetail',
name: 'logisticsDetail',
icon: 'smile',
component: '@/pages/balance/accountsReceivable/settlementList/logisticsDetail'
},
// 应收账款管理 -> 生产通知单结算明细
{
path: '/memberCenter/balance/accountsReceivable/settlementList/productNoticeSettlementDetail',
name: 'productNoticeSettlementDetail',
icon: 'smile',
component: '@/pages/balance/accountsReceivable/settlementList/productNoticeSettlementDetail'
},
// 应收账款管理 -> 开票管理
{
path: '/memberCenter/balance/accountsReceivable/invoice',
name: 'invoice',
icon: 'smile',
component: '@/pages/balance/accountsReceivable/invoice'
}
]
},
] ]
} }
......
...@@ -6,8 +6,12 @@ ...@@ -6,8 +6,12 @@
* @LastEditTime: 2020-10-26 18:20:31 * @LastEditTime: 2020-10-26 18:20:31
======= =======
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
<<<<<<< HEAD
* @LastEditTime: 2020-10-19 17:28:01 * @LastEditTime: 2020-10-19 17:28:01
>>>>>>> 69aca0d8... 添加结算 结算规则配置 >>>>>>> 69aca0d8... 添加结算 结算规则配置
=======
* @LastEditTime: 2020-10-20 13:40:28
>>>>>>> 26b20691... 结算能力页面大致完成
*/ */
export default { export default {
...@@ -502,5 +506,18 @@ export default { ...@@ -502,5 +506,18 @@ export default {
'menu.balance.settleRules.receiptInfoAdd': '新增发票信息', 'menu.balance.settleRules.receiptInfoAdd': '新增发票信息',
'menu.balance.settleRules.receiptInfo': '发票详情', 'menu.balance.settleRules.receiptInfo': '发票详情',
'menu.balance.settleRules.memberSettleAdd': '新增会员结算策略', 'menu.balance.settleRules.memberSettleAdd': '新增会员结算策略',
'menu.balance.platformSettlement': '平台结算管理',
'menu.balance.platformSettlement.accountReceivable': '平台代收账款结算',
'menu.balance.platformSettlement.accountReceivableInfo': '平台代收账款结算明细',
'menu.balance.platformSettlement.integral': '平台积分管理',
'menu.balance.platformSettlement.integralInfo': '平台积分管理详情',
'menu.balance.accountsPayable': '应付账款管理',
'menu.balance.accountsPayable.settlementList': '应付账款结算',
'menu.balance.accountsPayable.logisticsDetail': '物流通知单结算明细',
'menu.balance.accountsPayable.productNoticeSettlementDetail': '生产通知单结算明细',
'menu.balance.accountsReceivable': '应收账款结算',
'menu.balance.accountsReceivable.settlementList': '应付账款结算',
'menu.balance.accountsReceivable.logisticsDetail': '物流通知单结算明细',
'menu.balance.accountsReceivable.productNoticeSettlementDetail': '生产通知单结算明细',
'menu.balance.accountsReceivable.invoice': '开票管理',
}; };
\ No newline at end of file
/*
* @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 } 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';
const formActions = createFormActions();
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: {
name: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '加工企业名称(全部)',
allowClear: true,
},
},
time: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
const SettlementList = () => {
const ref = useRef<any>({})
const fetchListData = async (params) => {
return {}
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={[]}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
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';
const formActions = createFormActions();
const schema: 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: {
name: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '加工企业名称(全部)',
allowClear: true,
},
},
time: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
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={{
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={[]}
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={schema}
onSubmit={values => ref.current.reload(values)}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default logisticsDetail
\ No newline at end of file
/*
* @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';
const formActions = createFormActions();
const schema: 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: {
name: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '加工企业名称(全部)',
allowClear: true,
},
},
time: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
const ProductNoticeSettlementDetail: React.FC = () => {
const ref = useRef<any>({});
const fetchListData = async (params) => {
return {}
}
return (
<PageHeaderWrapper
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
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={[]}
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={schema}
onSubmit={values => ref.current.reload(values)}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default ProductNoticeSettlementDetail
\ No newline at end of file
/*
* @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 } 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';
const formActions = createFormActions();
const schema: 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: {
name: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '加工企业名称(全部)',
allowClear: true,
},
},
time: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
const SettlementList = () => {
const ref = useRef<any>({})
const fetchListData = async (params) => {
return {}
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
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={schema}
onSubmit={values => ref.current.reload(values)}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default SettlementList
/*
* @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 } 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';
const formActions = createFormActions();
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: {
name: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '加工企业名称(全部)',
allowClear: true,
},
},
time: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
const SettlementList = () => {
const ref = useRef<any>({})
const fetchListData = async (params) => {
return {}
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={[]}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
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';
const formActions = createFormActions();
const schema: 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: {
name: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '加工企业名称(全部)',
allowClear: true,
},
},
time: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
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={{
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={[]}
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={schema}
onSubmit={values => ref.current.reload(values)}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default logisticsDetail
\ No newline at end of file
/*
* @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';
const formActions = createFormActions();
const schema: 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: {
name: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '加工企业名称(全部)',
allowClear: true,
},
},
time: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
const ProductNoticeSettlementDetail: React.FC = () => {
const ref = useRef<any>({});
const fetchListData = async (params) => {
return {}
}
return (
<PageHeaderWrapper
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
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={[]}
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={schema}
onSubmit={values => ref.current.reload(values)}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default ProductNoticeSettlementDetail
\ No newline at end of file
/*
* @Author: your name
* @Date: 2020-10-20 16:25:45
* @Description: switch 组件
*/
import React from 'react';
import { Radio } from 'antd';
const SchemaRadio = (props) => {
const editable = props.editable;
const componentProps = props.props["x-component-props"];
const options = componentProps.enum
const handleChange = (checked) => {
props.mutators.change(checked)
}
return (
<Radio.Group onChange={handleChange} value={props.value || componentProps.default}>
{
options.map((item) => {
return (
<Radio value={item.value} key={item.value}>{item.label}</Radio>
)
})
}
</Radio.Group>
)
}
SchemaRadio.isFieldComponent = true;
export default SchemaRadio
\ No newline at end of file
/*
* @Author: your name
* @Date: 2020-10-20 16:25:45
* @Description: switch 组件
*/
import React from 'react';
import { Switch } from 'antd';
const SchemaSwitch = (props) => {
const editable = props.editable;
const handleChange = (checked) => {
props.mutators.change(checked)
}
return (
<Switch disabled={!editable} checked={props.value} onChange={handleChange} />
)
}
SchemaSwitch.isFieldComponent = true;
export default SchemaSwitch
\ No newline at end of file
.flexRow() {
display: flex;
flex-direction: row;
}
.period {
.flexRow();
margin-bottom: 20px;
.days {
.flexRow();
margin-left: 25px;
}
}
\ No newline at end of file
/*
* @Author: bILL
* @Date: 2020-10-20 17:39:16
* @Description: 新增会员结算结算方式
*/
import React from 'react';
import { Radio, Input } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
import styles from './index.less'
const SettleMethod = (props) => {
console.log(props);
return (
<div>
<div className={styles.period}>
<div>
<Radio>账期(默认)</Radio>
<QuestionCircleOutlined />
</div>
<div className={styles.days}>
<div style={{marginRight: '20px'}}>账期天数</div>
<div><Input addonAfter={"天"} /></div>
</div>
</div>
<div className={styles.period}>
<div >
<Radio>月结</Radio><QuestionCircleOutlined />
</div>
<div className={styles.days}>
<div style={{marginRight: '20px'}}>每月结算日期:每月</div>
<div><Input addonAfter={"号"} /></div>
</div>
</div>
</div>
)
}
export default SettleMethod;
\ No newline at end of file
/*
* @Author: your name
* @Date: 2020-10-20 09:37:53
* @Description: 平台代收账款结算
*/
import React, { useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card, Button } 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';
const formActions = createFormActions();
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: {
name: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '加工企业名称(全部)',
allowClear: true,
},
},
time: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
const AccountReceivable = () => {
const ref = useRef<any>({})
const fetchListData = async (params) => {
return {}
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={[]}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
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 AccountReceivable
\ No newline at end of file
/*
* @Author: Bill
* @Date: 2020-10-20 09:59:50
* @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';
const formActions = createFormActions();
const schema: 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: {
name: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '加工企业名称(全部)',
allowClear: true,
},
},
time: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
const Info: React.FC = () => {
const ref = useRef<any>({});
const fetchListData = async (params) => {
return {}
}
return (
<PageHeaderWrapper
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
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={[]}
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={schema}
onSubmit={values => ref.current.reload(values)}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default Info
/*
* @Author: Bill
* @Date: 2020-10-20 10:43:33
* @Description: 积分结算列表
*/
import React, { useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card, Button } 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';
const formActions = createFormActions();
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: {
name: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '加工企业名称(全部)',
allowClear: true,
},
},
time: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
const Integral: React.FC = () => {
const ref = useRef<any>({})
const fetchListData = async (params) => {
return {}
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={[]}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
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 Integral
\ No newline at end of file
/*
* @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';
const formActions = createFormActions();
const schema: 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: {
name: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '加工企业名称(全部)',
allowClear: true,
},
},
time: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
const Info: React.FC = () => {
const ref = useRef<any>({});
const fetchListData = async (params) => {
return {}
}
return (
<PageHeaderWrapper
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
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={[]}
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={schema}
onSubmit={values => ref.current.reload(values)}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default Info
\ No newline at end of file
@margin-bottom: 24px; @margin-bottom: 24px;
@font-size: 14px; @font-size: 14px;
@margin-right: 16px; @margin-right: 16px;
@color: #909399;
.item { .item {
display: flex; display: flex;
...@@ -16,14 +17,24 @@ ...@@ -16,14 +17,24 @@
height: 48px; height: 48px;
border-radius: 50%; border-radius: 50%;
margin-right: @margin-right; margin-right: @margin-right;
background-color: red;
.img {
width: 100%;
height: 100%;
}
} }
.itemName { .itemName {
margin-right: @margin-right; margin-right: @margin-right;
color: @color;
} }
.itemValue { .itemValue {
margin-right: @margin-right;; margin-right: @margin-right;;
color: #303133;
}
.edit {
cursor: pointer;
} }
} }
\ No newline at end of file
import React, { useState } from 'react'; import React, { useState, useEffect } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout' import { PageHeaderWrapper } from '@ant-design/pro-layout'
import styles from './index.less' import styles from './index.less'
import { FormOutlined } from '@ant-design/icons'; import { FormOutlined } from '@ant-design/icons';
import { Input } from 'antd'; import { Button, Input, Space } from 'antd';
import bank from '@/assets/imgs/bank.png';
import bank_account from '@/assets/imgs/bank_account.png';
import company from '@/assets/imgs/company.png';
import config from 'config/config';
interface Config {
name: string,
image: any,
value: string,
isEdit: boolean,
canEdit: boolean,
cacheValue: string,
changeEdit?: any,
}
const CONFIGS: Config[] = [
{
name: '账号名称',
image: company,
value: '广州市数商云网络科技有限公司',
cacheValue: '广州市数商云网络科技有限公司',
isEdit: false,
canEdit: false
},
{
name: '银行账号',
image: bank_account,
value: '6214 7812 3456 7891 1234',
cacheValue: '6214 7812 3456 7891 1234',
isEdit: false,
canEdit: true
},
{
name: '开户行',
image: bank,
value: '中国建设银行广州市分行营业部',
cacheValue: '中国建设银行广州市分行营业部',
isEdit: false,
canEdit: true
},
]
const ItemRender: React.FC<Config> = (props) => {
const { isEdit, name, canEdit, value, image, changeEdit } = props;
// const [inputValue, setInputValue] = useState(value);
const handleClick = (name:string) => {
changeEdit(name, { isEdit: true }, 'change')
}
const handleChange = (value:string, name: string) => {
changeEdit(name, {value: value}, 'change')
}
const handleCancel = (name: string) => {
changeEdit(name, { isEdit: false }, 'cancel')
}
const handleConfirm = (name: string) => {
changeEdit(name, { isEdit: false }, 'confirm');
}
const ItemRender = () => {
const [isEdit, setIsEdit] = useState(false)
return ( return (
<div className={styles.item}> <div className={styles.item}>
<div className={styles.image}></div> <div className={styles.image}>
<div className={styles.itemName}>账户名称</div> <img src={image} className={styles.img} />
<div className={styles.itemValue}>{isEdit ? <Input /> : "广州市数商云网络科技有限公司"}</div> </div>
<div className={styles.edit} onClick={() => setIsEdit(true)}> <div className={styles.itemName}>{name}</div>
<FormOutlined /> <div className={styles.itemValue}>
{isEdit ? <Input value={value} onChange={(e) => handleChange(e.target.value, name)}/> : value}
</div> </div>
{
canEdit
? !isEdit
? <div className={styles.edit} onClick={() => handleClick(name)} >
<FormOutlined />
</div>
: <div>
<Space>
<Button type="primary" onClick={() => handleConfirm(name)} >确定</Button>
<Button onClick={() => handleCancel(name)}>取消</Button>
</Space>
</div>
: null
}
</div> </div>
) )
} }
const CorporateAccount = () => { const CorporateAccount = () => {
const [configs, setConfigs] = useState<Config[]>(CONFIGS);
const changeEdit = (name: string, res: any, type: string) => {
let temp = [...configs];
const index = temp.findIndex((row) => row.name === name);
const target = temp[index];
if(type == 'change') {
temp[index] = {
...target,
...res,
}
} else if(type == 'cancel') {
temp[index] = {
...target,
...res,
value: type == 'cancel' ? target.cacheValue : target.value,
}
} else if(type == 'confirm') {
temp[index] = {
...target,
...res,
cacheValue: type == 'confirm' ? target.value : target.cacheValue
}
}
setConfigs(temp);
}
useEffect(() => {
// 进行基础赋值, fetchData
}, [])
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
{ {
[1,2,3].map((item, key) => { configs.map((item: Config, key) => {
return ( return (
<ItemRender key={key} /> <ItemRender key={item.name} {...item} changeEdit={changeEdit}/>
) )
}) })
} }
......
...@@ -11,8 +11,11 @@ import NiceForm from '@/components/NiceForm'; ...@@ -11,8 +11,11 @@ import NiceForm from '@/components/NiceForm';
import { StandardTable } from 'god'; import { StandardTable } from 'god';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusSwitch from '@/components/StatusSwitch';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd'; import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import { ColumnsType } from 'antd/es/table';
const formActions = createFormActions(); const formActions = createFormActions();
...@@ -53,28 +56,7 @@ const schema = { ...@@ -53,28 +56,7 @@ const schema = {
} }
} }
const columns = [
{
title: 'ID',
dataIndex: 'id',
},
{
title: '策略名称',
dataIndex: 'name',
},
{
title: '结算方式',
dataIndex: 'methods'
},
{
title: '结算单据',
dataIndex: 'create-at',
},
{
title: '状态',
dataIndex: 'status',
},
]
const MemberSettle: React.FC<{}> = () => { const MemberSettle: React.FC<{}> = () => {
const ref = useRef<any>({}); const ref = useRef<any>({});
...@@ -86,8 +68,52 @@ const MemberSettle: React.FC<{}> = () => { ...@@ -86,8 +68,52 @@ const MemberSettle: React.FC<{}> = () => {
return {} return {}
}; };
const handleModify = (record) => {
console.log(record);
}
const columns: ColumnsType<any> = [
{
title: 'ID',
dataIndex: 'id',
},
{
title: '策略名称',
dataIndex: 'name',
render: (text, record) => {
return (
<div>
<EyePreview
url={`/content/columnInfo?id=${record.id}&preview=1`}
>
{text}
</EyePreview>
</div>
)
}
},
{
title: '结算方式',
dataIndex: 'methods'
},
{
title: '结算单据',
dataIndex: 'create-at',
},
{
title: '状态',
dataIndex: 'status',
render: (text, record) => {
return (
<StatusSwitch
handleConfirm={() => handleModify(record)}
record={record}
fieldNames="status"
/>
)
}
},
]
return ( return (
<PageHeaderWrapper <PageHeaderWrapper
title={"生产通知单查询"} title={"生产通知单查询"}
......
...@@ -19,37 +19,10 @@ import { addSchema, memberSchema } from './schema'; ...@@ -19,37 +19,10 @@ import { addSchema, memberSchema } from './schema';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'; import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { QuestionCircleOutlined } from '@ant-design/icons' import { QuestionCircleOutlined } from '@ant-design/icons'
import SettleMethod from '../../components/SettleMethod';
const formActions = createFormActions(); const formActions = createFormActions();
const flexRowStyle = {display: 'flex', flexDirection: 'row'};
const SettleMethod = () => {
return (
<div>
<div style={{...flexRowStyle, marginBottom: '20px'}}>
<div>
<Radio>账期(默认)</Radio>
<QuestionCircleOutlined />
</div>
<div style={{...flexRowStyle, marginLeft: '20px'}}>
<div style={{marginRight: '20px'}}>账期天数</div>
<div><Input addonAfter={"天"} /></div>
</div>
</div>
<div style={{...flexRowStyle}}>
<div >
<Radio>月结</Radio><QuestionCircleOutlined />
</div>
<div style={{...flexRowStyle, marginLeft: '20px'}}>
<div style={{marginRight: '20px'}}>每月结算日期:每月</div>
<div><Input addonAfter={"号"} /></div>
</div>
</div>
</div>
)
}
const MemberSettleAdd: React.FC = () => { const MemberSettleAdd: React.FC = () => {
const [visible, setVisible] = useState(false) const [visible, setVisible] = useState(false)
const tableAddButton = () => { const tableAddButton = () => {
......
...@@ -19,6 +19,10 @@ ...@@ -19,6 +19,10 @@
.edit { .edit {
margin-right: 12px; margin-right: 12px;
cursor: pointer;
}
.remove {
cursor: pointer;
} }
} }
} }
...@@ -37,5 +41,5 @@ ...@@ -37,5 +41,5 @@
background: #FAFBFC; background: #FAFBFC;
border-radius: 2px; border-radius: 2px;
border: 1px solid #DCDFE6; border: 1px solid #DCDFE6;
cursor: pointer;
} }
\ No newline at end of file
...@@ -4,22 +4,34 @@ ...@@ -4,22 +4,34 @@
* @desc 发票管理 发票列表 * @desc 发票管理 发票列表
*/ */
import React from 'react'; import React, { useState, useEffect } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Row, Col, Switch } from 'antd'; import { Row, Col, Switch } from 'antd';
import { FormOutlined, DeleteOutlined, PlusOutlined } from '@ant-design/icons' import { FormOutlined, DeleteOutlined, PlusOutlined } from '@ant-design/icons'
import styles from './index.less' import styles from './index.less';
import { history, Link } from 'umi';
interface iProps { interface iProps {
} }
const ReceiptItem: React.FC = () => { interface ItemIprops {
onRemove: any
}
const ReceiptItem: React.FC<ItemIprops> = (props) => {
const handleRouterPush = () => {
history.push('/memberCenter/balance/settleRules/receiptList/detail');
}
const handleDelete = (id) => {
console.log(props);
props.onRemove(id);
}
return ( return (
<div className={styles.item}> <div className={styles.item}>
<div className={styles.controller}> <div className={styles.controller}>
<div className={styles.edit}><FormOutlined /></div> <div className={styles.edit} onClick={handleRouterPush}><FormOutlined /></div>
<div><DeleteOutlined /></div> <div className={styles.remove} onClick={() => handleDelete(1)}><DeleteOutlined /></div>
</div> </div>
<Row className={styles.row}> <Row className={styles.row}>
<Col span={6}>发票品类</Col> <Col span={6}>发票品类</Col>
...@@ -51,13 +63,32 @@ const ReceiptItem: React.FC = () => { ...@@ -51,13 +63,32 @@ const ReceiptItem: React.FC = () => {
</Row> </Row>
<Row> <Row>
<Col span={6}>是否默认</Col> <Col span={6}>是否默认</Col>
<Col span={18}><Switch /></Col> <Col span={18}><Switch disabled checked={true}/></Col>
</Row> </Row>
</div> </div>
) )
} }
const Receipt: React.FC<iProps> = () => { const Receipt: React.FC<iProps> = () => {
const [list, setList] = useState([]);
useEffect(() => {
// fetchData
async function fetchData() {
}
// fetchData()
}, [])
const handleRouterAdd = () => {
history.push('/memberCenter/balance/settleRules/receiptList/add')
}
// 删除发票
const remove = (id: number) => {
console.log(id);
}
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<Row gutter={24}> <Row gutter={24}>
...@@ -65,14 +96,14 @@ const Receipt: React.FC<iProps> = () => { ...@@ -65,14 +96,14 @@ const Receipt: React.FC<iProps> = () => {
[1,].map((item) => { [1,].map((item) => {
return ( return (
<Col span={8} key={item} className={styles.margin}> <Col span={8} key={item} className={styles.margin}>
<ReceiptItem/> <ReceiptItem onRemove={remove}/>
</Col> </Col>
) )
}) })
} }
<Col span={8} className={styles.margin}> <Col span={8} className={styles.margin}>
<div className={styles.add}> <div className={styles.add} onClick={handleRouterAdd}>
<div> <div>
<PlusOutlined /> <PlusOutlined />
</div> </div>
......
...@@ -4,11 +4,13 @@ ...@@ -4,11 +4,13 @@
* @Description: 结算规则配置 -> 发票管理 -> 新增发票 / 修改发票 * @Description: 结算规则配置 -> 发票管理 -> 新增发票 / 修改发票
*/ */
import React from 'react'; import React, { useState, useEffect } from 'react';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import { createFormActions, FormButtonGroup, Submit, Reset } from '@formily/antd'; import { createFormActions, FormButtonGroup, Submit, Reset } from '@formily/antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Switch, Button } from 'antd'; import { Card, Switch, Button } from 'antd';
import SchemaSwitch from '../../components/SchemaSwitch';
import SchemaRadio from '../../components/SchemaRadio';
const formActions = createFormActions(); const formActions = createFormActions();
...@@ -25,32 +27,48 @@ const schema = { ...@@ -25,32 +27,48 @@ const schema = {
}, },
properties: { properties: {
consignor: { consignor: {
type: 'radio', type: 'string',
title: '发货人', title: '发货人',
enum: [ 'x-component': 'SchemaRadio',
{label: '企业(默认)', value: 1}, 'x-component-props': {
{label: '个人', value: 2}, default: 1,
enum: [
{label: '企业(默认)', value: 1},
{label: '个人', value: 2},
],
},
'x-rules': [
{required: true, message: '请选择发货人'}
] ]
}, },
type: { type: {
type: 'radio', type: 'string',
title: '发货种类', title: '发货种类',
enum: [ 'x-component': 'SchemaRadio',
{label: '增值税普通发票(默认)', value: 1}, 'x-component-props': {
{label: '增值税专用发票', value: 2} default: 1,
enum: [
{label: '增值税普通发票(默认)', value: 1},
{label: '增值税专用发票', value: 2}
],
},
'x-rules': [
{required: true, message: '请选择发货种类'}
] ]
}, },
invoiceTitle: { invoiceTitle: {
type: 'string', type: 'string',
title: '发票抬头', title: '发票抬头',
'x-rule': [ 'x-rules': [
{required: true, message: '请填写发票抬头'} {required: true, message: '请填写发票抬头'}
] ],
}, },
taxNumber: { taxNumber: {
type: 'string', type: 'string',
title: '纳税号', title: '纳税号',
'x-rule': [ 'x-rules': [
{required: true, message: '请填写发票抬头'} {required: true, message: '请填写发票抬头'}
] ]
}, },
...@@ -98,7 +116,7 @@ const schema = { ...@@ -98,7 +116,7 @@ const schema = {
isDefault: { isDefault: {
type: 'object', type: 'object',
title: '是否默认', title: '是否默认',
'x-component': 'Switch' 'x-component': 'SchemaSwitch'
}, },
} }
...@@ -107,14 +125,32 @@ const schema = { ...@@ -107,14 +125,32 @@ const schema = {
} }
const Info: React.FC = () => { const Info: React.FC = () => {
const [initialValue, setInitialValue] = useState({});
const handleSubmit = (value) => {
console.log(value);
}
useEffect(() => {
async function fetchData() {
setInitialValue({
consignor: 2,
type: 2,
address: 'fuck you',
isDefault: true
})
}
fetchData();
}, [])
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<Card> <Card>
<NiceForm <NiceForm
components={{Switch}} components={{SchemaSwitch, SchemaRadio}}
actions={formActions} actions={formActions}
initialValues={initialValue}
expressionScope={{}} expressionScope={{}}
// onSubmit={values => ref.current.reload(values)} onSubmit={handleSubmit}
schema={schema} schema={schema}
> >
<FormButtonGroup offset={4}> <FormButtonGroup offset={4}>
......
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