Commit 9dcfd6c0 authored by Bill's avatar Bill

对接应收 应付账款管理

parent 25ed95dd
......@@ -7,7 +7,7 @@
/*
* @Author: Bill
* @Date: 2020-10-12 09:45:20
* @LastEditTime: 2020-10-23 16:08:13
* @LastEditTime: 2020-10-27 14:53:56
* @Description: 加工能力路由
*/
......@@ -133,14 +133,16 @@ const HandlingRoute = {
path: '/memberCenter/balance/accountsPayable/settlementList/logisticsDetail',
name: 'logisticsDetail',
icon: 'smile',
component: '@/pages/balance/accountsPayable/settlementList/logisticsDetail'
component: '@/pages/balance/accountsPayable/settlementList/logisticsDetail',
hideInMenu: true,
},
// 应付账款管理 -> 生产通知单结算明细
{
path: '/memberCenter/balance/accountsPayable/settlementList/productNoticeSettlementDetail',
name: 'productNoticeSettlementDetail',
icon: 'smile',
component: '@/pages/balance/accountsPayable/settlementList/productNoticeSettlementDetail'
component: '@/pages/balance/accountsPayable/settlementList/productNoticeSettlementDetail',
hideInMenu: true,
}
]
},
......@@ -162,14 +164,16 @@ const HandlingRoute = {
path: '/memberCenter/balance/accountsReceivable/settlementList/logisticsDetail',
name: 'logisticsDetail',
icon: 'smile',
component: '@/pages/balance/accountsReceivable/settlementList/logisticsDetail'
component: '@/pages/balance/accountsReceivable/settlementList/logisticsDetail',
hideInMenu: true,
},
// 应收账款管理 -> 生产通知单结算明细
{
path: '/memberCenter/balance/accountsReceivable/settlementList/productNoticeSettlementDetail',
name: 'productNoticeSettlementDetail',
icon: 'smile',
component: '@/pages/balance/accountsReceivable/settlementList/productNoticeSettlementDetail'
component: '@/pages/balance/accountsReceivable/settlementList/productNoticeSettlementDetail',
hideInMenu: true,
},
// 应收账款管理 -> 开票管理
{
......
......@@ -23,6 +23,7 @@ const GetCaptchaCode = (props) => {
setTime((prev) => prev - 1)
}, 1000)
} else if(time == 0) {
!!props.callback && props.callback()
clearInterval(ref.current)
}
}, [time])
......
......@@ -6,10 +6,10 @@
import React, { useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card, Button, DatePicker, Modal, Tag, Space } from 'antd';
import { Card, DatePicker} from 'antd';
import NiceForm from '@/components/NiceForm';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ISchema, createFormActions } from '@formily/antd';
import { createFormActions } from '@formily/antd';
import { StandardTable } from 'god';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
......@@ -17,37 +17,67 @@ import { schema } from './schema';
import StatusTag from '../../components/StatusTag';
import StatusActions from '../../components/StatusActions';
import { PublicApi } from '@/services/api';
import EyePreview from '@/components/EyePreview';
import { Moment } from 'moment';
const formActions = createFormActions();
interface SearchParams {
settlementName?: string,
payName?: string,
isSettlement: number,
startTime?: Moment,
endTime?: Moment,
orderType?: number,
status?: number,
current: number,
pageSize: number,
}
const SettlementList = () => {
const ref = useRef<any>({})
const fetchListData = async (params) => {
const searchParams = {
orderType: 0,
status: 0,
...params,
orderType: params.orderType || 0,
status: params.status || 0,
}
// /settle/accounts/member/settlement/pagePayableSettlement
const { data } = await PublicApi.getSettleAccountsMemberSettlementPagePayableSettlement(searchParams);
return {
totalCount: 1,
data: [{id: 1, status: 2}]
}
return data
}
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',
title: '结算单号',
dataIndex: 'settlementNo',
render: (text, record) => {
const prefix = `/memberCenter/balance/accountsPayable/settlementList/`;
const url = record.orderType === 1 ? `logisticsDetail` : `productNoticeSettlementDetail`;
return (
<EyePreview url={`${prefix}${url}?id=${record.id}`} >
{record.settlementNo}
</EyePreview>
)
}
},
{title: '结算日期', dataIndex: 'settlementDate'},
{title: '结算方式', dataIndex: 'settlementWayName'},
{title: '结算方', dataIndex: 'settlementName'},
{title: '结算单据', dataIndex: 'orderTypeName'},
{title: '总单数', dataIndex: 'totalCount'},
{title: '结算金额', dataIndex: 'amount'},
{title: '结算时间', dataIndex: 'settlementTime'},
{title: '支付方式', dataIndex: 'payWayName'},
{
title: '结算状态', dataIndex: 'status',
filters: [
{ text: '待对账', value: 1 },
{ text: '待付款', value: 2 },
{ text: '待收款', value: 3 },
{ text: '以完成', value: 4 },
],
onFilter: (value: number, record: any) => record.status == value,
render: (text: string, record: any) => {
return (
<StatusTag status={record.status} />
)
......@@ -55,13 +85,18 @@ const SettlementList = () => {
},
{
title: '操作',
render: (text, record) => {
render: (text: string, record: any) => {
return (
<StatusActions
status={record.status}
handleReconciledComfirm={handleConfirm}
handleComfirmInCompletePayment={handleComfirmInCompletePayment}
handleComfirmCompletePayment={handleComfirmCompletePayment}
status={record.status <= 2 ? record.status : 4 }
id={record.id}
excludes={[1, 3]}
settlementId={record.settlementID || 1}
handleUpload={handleUploadVoucher}
type={1}
// handleReconciledComfirm={handleConfirm}
// handleComfirmInCompletePayment={handleComfirmInCompletePayment}
// handleComfirmCompletePayment={handleComfirmCompletePayment}
/>
)
}
......@@ -69,33 +104,39 @@ const SettlementList = () => {
]
/**
* 确认对账
* @param cancel 关闭回调函数
* 上传凭证
* @param params
*/
const handleConfirm = (params: any) => {
console.log(123)
params.onCancel();
}
const handleComfirmInCompletePayment = (params: any) => {
const handleUploadVoucher = (params: any) => {
console.log(params);
params.onCancel()
///settle/accounts/member/settlement/pay
PublicApi.postSettleAccountsMemberSettlementPay({id: params.id, proveList: params.fileList})
.then((data) => {
if(data.code === 1000) {
formActions.submit();
params.onCancel()
}
})
}
const handleComfirmCompletePayment = (params: any) => {
params.onCancel();
}
// const handleComfirmInCompletePayment = (params: any) => {
// console.log(params);
// params.onCancel()
// }
// const handleComfirmCompletePayment = (params: any) => {
// params.onCancel();
// }
/**
* 搜索
*/
const handleSearch = (values) => {
console.log(values);
const handleSearch = (values: SearchParams) => {
const format = 'YYYY-MM-DD'
const startTime = values.startTime?.format(format);
const endTime = values.endTime?.format(format);
console.log(startTime, endTime);
ref.current.reload({startTime, endTime});
ref.current.reload({...values, startTime, endTime});
}
return (
......@@ -114,7 +155,7 @@ const SettlementList = () => {
components={{DatePicker}}
expressionScope={{}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.name', FORM_FILTER_PATH);
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.settlementName', FORM_FILTER_PATH);
// useAsyncInitSelect(
// ['innerStatus', 'outerStatus'],
// fetchSelectOptions,
......
......@@ -6,33 +6,22 @@
import React, { useRef, useEffect, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card, PageHeader, Descriptions, Button} from 'antd';
import { Card, PageHeader, Descriptions, Button, DatePicker} 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 { createFormActions } from '@formily/antd';
import { StandardTable } from 'god';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { detailSchema } from './schema'
import { logisticsDetailSchema } from './schema'
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
import StatusTag from '../../components/StatusTag';
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 RangePicker = DatePicker.RangePicker
const formActions = createFormActions();
interface infoType {
id: number, // 会员结算id
......@@ -47,18 +36,32 @@ interface infoType {
statusName: string // 结算状态名称
}
const columns = [
{title: '单据号', dataIndex: 'orderNo'},
{title: '单据摘要', dataIndex: 'orderAbstract'},
{title: '单据类型', dataIndex: 'orderTypeName'},
{title: '单据时间', dataIndex: 'orderTime'},
{title: '总箱数', dataIndex: 'totalCarton'},
{title: '总重量', dataIndex: 'totalWeight'},
{title: '总体积', dataIndex: 'totalVolume'},
{title: '接单金额', dataIndex: 'orderAmount'},
{title: '接单时间', dataIndex: 'acceptOrderTime'},
{title: '结算金额', dataIndex: 'settlementAmount'},
]
const logisticsDetail: React.FC = () => {
const ref = useRef<any>({});
const [infoDetail, setInfoDetail] = useState<infoType>(null);
const { id, preview } = usePageStatus();
const fetchListData = async (params) => {
console.log(id);
// const { data } = await PublicApi.getSettleAccountsMemberSettlementGetPayableDetail({id})
return {
totalCount: 0,
data: []
const postData = {
settlementId: id,
...params
}
///settle/accounts/member/settlement/pagePayableLogisticsSettlement
const { data } = await PublicApi.getSettleAccountsMemberSettlementPagePayableLogisticsSettlement(postData)
return data
}
useEffect(() => {
......@@ -72,6 +75,17 @@ const logisticsDetail: React.FC = () => {
}
}, [id])
/**
* 搜索
*/
const handleSearch = (values) => {
console.log(values);
const format = 'YYYY-MM-DD'
const startTime = values.startTime?.format(format);
const endTime = values.endTime?.format(format);
ref.current.reload({...values, startTime, endTime});
}
return (
<PageHeaderWrapper
title={
......@@ -86,7 +100,7 @@ const logisticsDetail: React.FC = () => {
name: "结算单号:"
}}
extra={(
<span style={{ fontSize: 12, fontWeight: 'normal' }}>{"TPTY12"}</span>
<span style={{ fontSize: 12, fontWeight: 'normal' }}>{infoDetail?.settlementNo}</span>
)}
/>
}
......@@ -118,6 +132,7 @@ const logisticsDetail: React.FC = () => {
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
components={{RangePicker}}
actions={formActions}
expressionScope={{
exportBtn: (
......@@ -127,14 +142,14 @@ const logisticsDetail: React.FC = () => {
)
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.topLayout.search', FORM_FILTER_PATH);
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.topLayout.orderNo', FORM_FILTER_PATH);
// useAsyncInitSelect(
// ['innerStatus', 'outerStatus'],
// fetchSelectOptions,
// );
}}
schema={detailSchema}
onSubmit={values => ref.current.reload(values)}
schema={logisticsDetailSchema}
onSubmit={handleSearch}
/>
}
/>
......
......@@ -6,7 +6,7 @@
import React, { useRef, useState, useEffect } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card, PageHeader, Descriptions, Button} from 'antd';
import { Card, PageHeader, Descriptions, Button, DatePicker} from 'antd';
import { history } from 'umi';
import AvatarWrap from '@/components/AvatarWrap';
import NiceForm from '@/components/NiceForm';
......@@ -18,6 +18,7 @@ import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { detailSchema } from './schema'
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
const RangePicker = DatePicker.RangePicker;
const formActions = createFormActions();
......@@ -53,7 +54,12 @@ const ProductNoticeSettlementDetail: React.FC = () => {
const { id, preview } = usePageStatus();
const fetchListData = async (params) => {
return {}
const postData = {
settlementId: id,
...params
}
const { data } = await PublicApi.getSettleAccountsMemberSettlementPagePayableProductionNoticeSettlement(postData)
return data
}
useEffect(() => {
......@@ -67,6 +73,20 @@ const ProductNoticeSettlementDetail: React.FC = () => {
}
}, [id])
/**
* 搜索
*/
const handleSearch = (values) => {
console.log(values);
const format = 'YYYY-MM-DD'
const startTime = values.startTime?.format(format);
const endTime = values.endTime?.format(format);
const receiveStartTime = values.receiveStartTime?.format(format);
const receiveEndTime = values.receiveEndTime?.format(format);
ref.current.reload({...values, startTime, endTime, receiveStartTime, receiveEndTime});
}
return (
<PageHeaderWrapper
title={
......@@ -78,10 +98,10 @@ const ProductNoticeSettlementDetail: React.FC = () => {
<AvatarWrap
info={{
aloneTxt: '单',
name: "通知单号:"
name: "结算单号:"
}}
extra={(
<span style={{ fontSize: 12, fontWeight: 'normal' }}>{"TPTY12"}</span>
<span style={{ fontSize: 12, fontWeight: 'normal' }}>{infoDetail?.settlementNo}</span>
)}
/>
}
......@@ -114,6 +134,7 @@ const ProductNoticeSettlementDetail: React.FC = () => {
controlRender={
<NiceForm
actions={formActions}
components={{RangePicker}}
expressionScope={{
exportBtn: (
<div>
......@@ -122,14 +143,14 @@ const ProductNoticeSettlementDetail: React.FC = () => {
)
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.topLayout.search', FORM_FILTER_PATH);
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.topLayout.orderNo', FORM_FILTER_PATH);
// useAsyncInitSelect(
// ['innerStatus', 'outerStatus'],
// fetchSelectOptions,
// );
}}
schema={detailSchema}
onSubmit={values => ref.current.reload(values)}
onSubmit={handleSearch}
/>
}
/>
......
......@@ -17,11 +17,11 @@ export const schema: ISchema = {
type: 'object',
'x-component': 'mega-layout',
properties: {
name: {
settlementName: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索(结算方)',
align: 'flex-left',
// tip: '输入通知单号、通知单摘要进行搜索',
},
......@@ -52,12 +52,32 @@ export const schema: ISchema = {
},
status: {
type: 'string',
enum: [],
enum: [
{ label: '结算状态(所有)', value: 0 },
{ label: '待对账', value: 1 },
{ label: '待付款', value: 2 },
{ label: '代收款', value: 3 },
{ label: '完成', value: 4 },
],
default: 0,
'x-component-props': {
placeholder: '结算状态(全部)',
allowClear: true,
},
},
orderType: {
type: 'string',
enum: [
{ label: '结算单据(所有)', value: 0 },
{ label: '生产通知单', value: 1 },
{ label: '物流单', value: 2 },
],
default: 0,
'x-component-props': {
placeholder: '结算单据(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......@@ -100,11 +120,11 @@ export const detailSchema: ISchema = {
children: '{{exportBtn}}',
},
},
search: {
orderNo: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索(单据号)',
},
},
},
......@@ -118,35 +138,117 @@ export const detailSchema: ISchema = {
},
},
properties: {
orderTime: {
orderAbstract: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '下单时间(全部)',
allowClear: true,
placeholder: '单据摘要'
}
},
"[startTime, endTime]": {
type: 'array',
'x-component': 'RangePicker',
'x-component-props': {
showTime: false,
allowClear: true,
placeholder: ["单据时间(开始时间)", "单据时间(结束时间)"]
},
},
payTime: {
"[receiveStartTime, receiveEndTime]": {
type: 'array',
'x-component': 'RangePicker',
'x-component-props': {
showTime: false,
allowClear: true,
placeholder: ["收货时间(开始时间)", "收货时间(结束时间)"]
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
/**
* 应付账款结算--物流单结算明细
*/
export const logisticsDetailSchema: 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}}',
},
},
orderNo: {
type: 'string',
enum: [],
'x-component': 'Search',
'x-component-props': {
placeholder: '支付时间(全部)',
allowClear: true,
placeholder: '搜索(单据号)',
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
colStyle: {
marginLeft: 20,
},
},
properties: {
orderAbstract: {
type: 'string',
'x-component-props': {
placeholder: '单据摘要'
}
},
"[startTime, endTime]": {
type: 'array',
'x-component': 'RangePicker',
'x-component-props': {
showTime: false,
allowClear: true,
placeholder: ["单据时间(开始时间)", "单据时间(结束时间)"]
},
},
// submit: {
// 'x-component': 'Submit',
// 'x-mega-props': {
// span: 1,
// },
// 'x-component-props': {
// children: '查询',
// },
// },
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
\ No newline at end of file
};
......@@ -17,6 +17,7 @@ import { schema } from './schema';
import { PublicApi } from '@/services/api';
import StatusActions from '../../components/StatusActions';
import StatusTag from '../../components/StatusTag';
import EyePreview from '@/components/EyePreview';
const formActions = createFormActions();
......@@ -24,26 +25,45 @@ const SettlementList = () => {
const ref = useRef<any>({})
const fetchListData = async (params) => {
const searchParams = {
orderType: 0,
status: 0,
...params,
orderType: params.orderType || 0,
status: params.status || 0,
}
// /settle/accounts/member/settlement/pagePayableSettlement
const { data } = await PublicApi.getSettleAccountsMemberSettlementPageReceivableSettlement(searchParams);
return data
}
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: 'settlementNo',
render: (text, record) => {
const prefix = `/memberCenter/balance/accountsReceivable/settlementList/`;
const url = record.orderTypeName === '物流单' ? `logisticsDetail` : `productNoticeSettlementDetail`;
return (
<EyePreview url={`${prefix}${url}?id=${record.id}`} >
{record.settlementNo}
</EyePreview>
)
}
},
{title: '结算日期', dataIndex: 'settlementDate'},
{title: '结算方式', dataIndex: 'settlementWayName'},
{title: '付款方', dataIndex: 'payName'},
{title: '结算单据', dataIndex: 'orderTypeName'},
{title: '总单数', dataIndex: 'totalCount'},
{title: '结算金额', dataIndex: 'amount'},
{title: '结算时间', dataIndex: 'settlementTime'},
{title: '支付方式', dataIndex: 'payWayName'},
{
title: '结算状态', dataIndex: 'status',
filters: [
{ text: '待对账', value: 1 },
{ text: '待付款', value: 2 },
{ text: '待收款', value: 3 },
{ text: '以完成', value: 4 },
],
onFilter: (value: number, record: any) => record.status == value,
render: (text, record) => {
return (
<StatusTag status={record.status || 1} />
......@@ -55,7 +75,11 @@ const SettlementList = () => {
render: (text, record) => {
return (
<StatusActions
status={record.status || 3}
excludes={[2]}
// {...record}
id={record.id}
type={2}
status={record.status}
handleReconciledComfirm={handleConfirm}
handleComfirmInCompletePayment={handleComfirmInCompletePayment}
handleComfirmCompletePayment={handleComfirmCompletePayment}
......@@ -67,21 +91,49 @@ const SettlementList = () => {
/**
* 确认对账
* @param cancel 关闭回调函数
* @param {cancel: function, id: number} cancel 为关闭回调函数
*/
const handleConfirm = (params: any) => {
console.log(123)
params.onCancel();
PublicApi.postSettleAccountsMemberSettlementConfirmAccountComplete({settlementId: params.id})
.then((data) => {
if(data.code === 1000) {
params.onCancel();
formActions.submit();
}
})
}
/**
* 确认未到款
* @param params
*/
const handleComfirmInCompletePayment = (params: any) => {
console.log(params);
params.onCancel()
}
/**
* 确认到款
* @param {onCancel:function, id: number, status: number}
*/
const handleComfirmCompletePayment = (params: any) => {
params.onCancel();
PublicApi.postSettleAccountsMemberSettlementConfirmPayProve({id: params.id, status: params.id})
.then((data) => {
if(data.code === 1000) {
params.onCancel();
}
})
}
/**
* 搜索
*/
const handleSearch = (values: any) => {
const format = 'YYYY-MM-DD'
const startTime = values.startTime?.format(format);
const endTime = values.endTime?.format(format);
ref.current.reload({...values, startTime, endTime});
}
return (
<PageHeaderWrapper>
<Card>
......@@ -98,14 +150,14 @@ const SettlementList = () => {
actions={formActions}
expressionScope={{}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.name', FORM_FILTER_PATH);
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.payName', FORM_FILTER_PATH);
// useAsyncInitSelect(
// ['innerStatus', 'outerStatus'],
// fetchSelectOptions,
// );
}}
schema={schema}
onSubmit={values => ref.current.reload(values)}
onSubmit={handleSearch}
/>
}
/>
......
......@@ -6,7 +6,7 @@
import React, { useRef, useEffect, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card, PageHeader, Descriptions, Button} from 'antd';
import { Card, PageHeader, Descriptions, Button, DatePicker} from 'antd';
import { history } from 'umi';
import AvatarWrap from '@/components/AvatarWrap';
import NiceForm from '@/components/NiceForm';
......@@ -15,10 +15,12 @@ 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'
import { logisticsDetailSchema } from './schema'
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
import StatusTag from '../../components/StatusTag';
const RangePicker = DatePicker.RangePicker;
const formActions = createFormActions();
const columns = [
......@@ -53,25 +55,35 @@ const logisticsDetail: React.FC = () => {
const { id, preview } = usePageStatus();
const fetchListData = async (params) => {
console.log(id);
// const { data } = await PublicApi.getSettleAccountsMemberSettlementGetPayableDetail({id})
return {
totalCount: 0,
data: []
const postData = {
settlementId: id,
...params
}
const { data } = await PublicApi.getSettleAccountsMemberSettlementPageReceivableLogisticsSettlement(postData)
return data
}
useEffect(() => {
if(id) {
// 获取详情
async function fetchDetail() {
const { data } = await PublicApi.getSettleAccountsMemberSettlementGetPayableDetail({id})
const { data } = await PublicApi.getSettleAccountsMemberSettlementGetReceivableDetail({id})
setInfoDetail(data);
}
fetchDetail();
}
}, [id])
/**
* 搜索
*/
const handleSearch = (values) => {
const format = 'YYYY-MM-DD'
const startTime = values.startTime?.format(format);
const endTime = values.endTime?.format(format);
ref.current.reload({...values, startTime, endTime});
}
return (
<PageHeaderWrapper
title={
......@@ -86,7 +98,7 @@ const logisticsDetail: React.FC = () => {
name: "结算单号:"
}}
extra={(
<span style={{ fontSize: 12, fontWeight: 'normal' }}>{"TPTY12"}</span>
<span style={{ fontSize: 12 }}>{infoDetail?.settlementNo}</span>
)}
/>
}
......@@ -118,6 +130,7 @@ const logisticsDetail: React.FC = () => {
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
components={{RangePicker}}
actions={formActions}
expressionScope={{
exportBtn: (
......@@ -127,14 +140,14 @@ const logisticsDetail: React.FC = () => {
)
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.topLayout.search', FORM_FILTER_PATH);
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.topLayout.orderNo', FORM_FILTER_PATH);
// useAsyncInitSelect(
// ['innerStatus', 'outerStatus'],
// fetchSelectOptions,
// );
}}
schema={detailSchema}
onSubmit={values => ref.current.reload(values)}
schema={logisticsDetailSchema}
onSubmit={handleSearch}
/>
}
/>
......
......@@ -6,7 +6,7 @@
import React, { useRef, useState, useEffect } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card, PageHeader, Descriptions, Button} from 'antd';
import { Card, PageHeader, Descriptions, Button, DatePicker} from 'antd';
import { history } from 'umi';
import AvatarWrap from '@/components/AvatarWrap';
import NiceForm from '@/components/NiceForm';
......@@ -19,19 +19,20 @@ import { detailSchema } from './schema'
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
const RangePicker = DatePicker.RangePicker;
const formActions = createFormActions();
const columns = [
{title: '单据号', dataIndex: 'no'},
{title: '单据摘要', dataIndex: 'desc'},
{title: '单据类型', dataIndex: 'type'},
{title: '单据时间', dataIndex: 'time'},
{title: '单据总额', dataIndex: 'total'},
{title: '单据号', dataIndex: 'orderNo'},
{title: '单据摘要', dataIndex: 'orderAbstract'},
{title: '单据类型', dataIndex: 'orderTypeName'},
{title: '单据时间', dataIndex: 'orderTime'},
{title: '单据总额', dataIndex: 'orderAmount'},
{title: '收货批次', dataIndex: 'batch'},
{title: '收货时间', dataIndex: 'receiveTime'},
{title: '收货数量', dataIndex: 'receiveCount'},
{title: '加工单价', dataIndex: 'unitPrice'},
{title: '结算金额', dataIndex: 'payPrice'},
{title: '收货数量', dataIndex: 'receiveTime'},
{title: '加工单价', dataIndex: 'processPrice'},
{title: '结算金额', dataIndex: 'settlementAmount'},
]
interface infoType {
......@@ -53,20 +54,39 @@ const ProductNoticeSettlementDetail: React.FC = () => {
const { id, preview } = usePageStatus();
const fetchListData = async (params) => {
return {}
const postData = {
settlementId: id,
...params
}
// /settle/accounts/member/settlement/pageReceivableProductionNoticeSettlement
const { data } = await PublicApi.getSettleAccountsMemberSettlementPageReceivableProductionNoticeSettlement(postData)
return data
}
useEffect(() => {
if(id) {
// 获取详情
async function fetchDetail() {
const { data } = await PublicApi.getSettleAccountsMemberSettlementGetPayableDetail({id})
const { data } = await PublicApi.getSettleAccountsMemberSettlementGetReceivableDetail({id})
setInfoDetail(data);
}
fetchDetail();
}
}, [id])
/**
* 搜索
*/
const handleSearch = (values) => {
console.log(values);
const format = 'YYYY-MM-DD'
const startTime = values.startTime?.format(format);
const endTime = values.endTime?.format(format);
const receiveStartTime = values.receiveStartTime?.format(format);
const receiveEndTime = values.receiveEndTime?.format(format);
ref.current.reload({...values, startTime, endTime, receiveStartTime, receiveEndTime});
}
return (
<PageHeaderWrapper
title={
......@@ -78,10 +98,10 @@ const ProductNoticeSettlementDetail: React.FC = () => {
<AvatarWrap
info={{
aloneTxt: '单',
name: "通知单号:"
name: "结算单号:"
}}
extra={(
<span style={{ fontSize: 12, fontWeight: 'normal' }}>{"TPTY12"}</span>
<span style={{ fontSize: 12 }}>{infoDetail?.settlementNo}</span>
)}
/>
}
......@@ -106,13 +126,14 @@ const ProductNoticeSettlementDetail: React.FC = () => {
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowKey: (record) => `${record.orderNo}-${record.batch}`,
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
components={{RangePicker}}
actions={formActions}
expressionScope={{
exportBtn: (
......@@ -122,14 +143,14 @@ const ProductNoticeSettlementDetail: React.FC = () => {
)
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.topLayout.search', FORM_FILTER_PATH);
useStateFilterSearchLinkageEffect($, actions, 'megaLayout.topLayout.orderNo', FORM_FILTER_PATH);
// useAsyncInitSelect(
// ['innerStatus', 'outerStatus'],
// fetchSelectOptions,
// );
}}
schema={detailSchema}
onSubmit={values => ref.current.reload(values)}
onSubmit={handleSearch}
/>
}
/>
......
......@@ -17,13 +17,13 @@ export const schema: ISchema = {
type: 'object',
'x-component': 'mega-layout',
properties: {
name: {
payName: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索(付款方)',
align: 'flex-left',
tip: '输入通知单号、通知单摘要进行搜索',
// tip: '输入通知单号、通知单摘要进行搜索',
},
},
[FORM_FILTER_PATH]: {
......@@ -52,21 +52,41 @@ export const schema: ISchema = {
},
status: {
type: 'string',
enum: [],
enum: [
{ label: '结算状态(所有)', value: 0 },
{ label: '待对账', value: 1 },
{ label: '待付款', value: 2 },
{ label: '代收款', value: 3 },
{ label: '完成', value: 4 },
],
default: 0,
'x-component-props': {
placeholder: '结算状态(全部)',
allowClear: true,
},
},
// submit: {
// 'x-component': 'Submit',
// 'x-mega-props': {
// span: 1,
// },
// 'x-component-props': {
// children: '查询',
// },
// },
orderType: {
type: 'string',
enum: [
{ label: '结算单据(所有)', value: 0 },
{ label: '生产通知单', value: 1 },
{ label: '物流单', value: 2 },
],
default: 0,
'x-component-props': {
placeholder: '结算单据(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
......@@ -75,7 +95,7 @@ export const schema: ISchema = {
};
/**
* 应收账款管理--物流单结算明细详情, 生产通知单结算明细
* 应收账款管理- 生产通知单结算明细
*/
export const detailSchema: ISchema = {
......@@ -99,11 +119,11 @@ export const detailSchema: ISchema = {
children: '{{exportBtn}}',
},
},
search: {
orderNo: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索(单据号)',
},
},
},
......@@ -117,35 +137,117 @@ export const detailSchema: ISchema = {
},
},
properties: {
orderTime: {
orderAbstract: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '下单时间(全部)',
allowClear: true,
placeholder: '单据摘要'
}
},
"[startTime, endTime]": {
type: 'array',
'x-component': 'RangePicker',
'x-component-props': {
showTime: false,
allowClear: true,
placeholder: ["单据时间(开始时间)", "单据时间(结束时间)"]
},
},
"[receiveStartTime, receiveEndTime]": {
type: 'array',
'x-component': 'RangePicker',
'x-component-props': {
showTime: false,
allowClear: true,
placeholder: ["收货时间(开始时间)", "收货时间(结束时间)"]
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
payTime: {
},
},
},
},
},
};
/**
* 应付账款结算--物流单结算明细
*/
export const logisticsDetailSchema: 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}}',
},
},
orderNo: {
type: 'string',
enum: [],
'x-component': 'Search',
'x-component-props': {
placeholder: '支付时间(全部)',
allowClear: true,
placeholder: '搜索(单据号)',
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
colStyle: {
marginLeft: 20,
},
},
properties: {
orderAbstract: {
type: 'string',
'x-component-props': {
placeholder: '单据摘要'
}
},
"[startTime, endTime]": {
type: 'array',
'x-component': 'RangePicker',
'x-component-props': {
showTime: false,
allowClear: true,
placeholder: ["单据时间(开始时间)", "单据时间(结束时间)"]
},
},
// submit: {
// 'x-component': 'Submit',
// 'x-mega-props': {
// span: 1,
// },
// 'x-component-props': {
// children: '查询',
// },
// },
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
\ No newline at end of file
};
......@@ -6,17 +6,30 @@
import React from 'react';
const ConfirmAccount = () => {
interface Iprops {
/**
* 结算日期
*/
settlementDate: string,
/**
* 付款方
*/
payName: string
}
const ConfirmAccount: React.FC<Iprops> = (props) => {
const { settlementDate, payName } = props
return (
<div>
<h3 style={{margin: 0}}>是否确认以下对账已完成?</h3>
<div style={{margin: '24px 0'}}>
<span style={{color: '#909399', width: '60px', display: 'inline-block'}}>结算日期:</span>
<span>2020-08-25</span>
<span>{settlementDate}</span>
</div>
<div>
<span style={{color: '#909399', width: '60px', display: 'inline-block'}}>付款方:</span>
<span>平台</span>
<span>{payName}</span>
</div>
</div>
)
......
......@@ -3,7 +3,7 @@
* @Date: 2020-10-23 17:24:23
* @Description: 结算能力列表操作
*/
import React from 'react';
import React, { useState, useEffect } from 'react';
import ModalContainer from '../ModalContainer';
import { Modal, Space, Button } from 'antd';
import ConfirmAccount from '../../components/ConfirmAccount';
......@@ -11,16 +11,25 @@ import Voucher from '../../components/Voucher';
import { StatusEnum, TO_BE_RECONCILED, TO_BE_PAY, TO_BE_COLLECTED, COMPLETED } from '../../components/StatusTag';
import styles from './index.less';
import UploadPayVoucher from '../../components/UploadPayVoucher';
import { PublicApi } from '@/services/api';
interface Iprops {
status: StatusEnum,
id: number, // 应付,应收账款id
settlementDate?: string, // 结算日期
settlementId?: number, // 结算方id
payName?: string, //付款方
excludes: number[], // 排除数组,比如当应付的时候,只留下查看凭证跟付款, 应收账款的时候保留三个
type?: number, // 1 -> 应付账款结算 2-> 应收账款结算, 用于判断 查看付款凭证
handleReconciledComfirm?: (params: any) => void // 对账确定回调
handleComfirmInCompletePayment?: (params: any) => void, // 确认未到款回调
handleComfirmCompletePayment?: (params:any) => void, //确认到款回调
handleUpload?: (params: any) => void, // 上传凭证
}
// 显示确认对账
const ConfirmAccountComponent: React.FC<Iprops> = (props) => {
const { settlementDate, payName } = props;
return (
<ModalContainer>
{
......@@ -32,9 +41,9 @@ const ConfirmAccountComponent: React.FC<Iprops> = (props) => {
title="确认对账完成"
visible={visible}
onCancel={cancel}
onOk={() => props.handleReconciledComfirm({onCancel: cancel})}
onOk={() => props.handleReconciledComfirm({onCancel: cancel, id: props.id})}
>
<ConfirmAccount />
<ConfirmAccount settlementDate={settlementDate} payName={payName} />
</Modal>
<div className={styles.modalBtn} onClick={show}>确认对账完成</div>
</>
......@@ -59,16 +68,16 @@ const ConfirmCollected = (props) => {
<Button onClick={cancel}>取消</Button>
<Button
danger
onClick={() => props.handleComfirmInCompletePayment({onCancel: cancel})}
onClick={() => props.handleComfirmInCompletePayment({onCancel: cancel, status: 0, id: props.id})}
>确认未到款</Button>
<Button
type={"primary"}
onClick={() => props.handleComfirmCompletePayment({onCancel: cancel})}
onClick={() => props.handleComfirmCompletePayment({onCancel: cancel, status: 1, id: props.id})}
>确认到款</Button>
</Space>
)}
>
<Voucher />
<WrapVoucher id={props.id} type={props.type} />
</Modal>
<div className={styles.modalBtn} onClick={show}>确认付款凭证</div>
</>
......@@ -79,8 +88,31 @@ const ConfirmCollected = (props) => {
)
}
const WrapVoucher = ({ id, type}) => {
const [files, setFiles] = useState([]);
console.log(id);
useEffect(() => {
if(id) {
const service = type == 1
? PublicApi.getSettleAccountsMemberSettlementGetPayablePayProve
: PublicApi.getSettleAccountsMemberSettlementGetReceivablePayProve
service({id}).then((data) => {
if(data.code == 1000) {
setFiles(data.data)
}
})
}
}, [id])
return (
<Voucher files={files} />
)
}
// 显示查看付款凭证
const ViewPaymentVoucher: React.FC = (props) => {
const ViewPaymentVoucher = (props) => {
return (
<ModalContainer>
{
......@@ -88,7 +120,7 @@ const ViewPaymentVoucher: React.FC = (props) => {
return (
<>
<Modal width={548} title="查看付款凭证" onCancel={cancel} visible={visible} footer={null}>
<Voucher files={[]} />
<WrapVoucher id={props.id} type={props.type} />
</Modal>
<div className={styles.modalBtn} onClick={show}>查看付款凭证</div>
</>
......@@ -99,8 +131,25 @@ const ViewPaymentVoucher: React.FC = (props) => {
)
}
interface UploadVocherProps {
settlementId: number,
id: number
handleUpload: (params: any) => void
}
interface FileType {
name: string,
proveUrl: string
}
// 待付款 状态 上传付款凭证
const UploadVoucher: React.FC = (props) => {
const UploadVoucher: React.FC<UploadVocherProps> = (props) => {
const { settlementId } = props;
const [fileList, setFileList] = useState<FileType[]>([]);
const getFileList = (list: FileType[]) => {
setFileList(list);
}
return (
<ModalContainer>
{
......@@ -117,11 +166,12 @@ const UploadVoucher: React.FC = (props) => {
<Button onClick={cancel}>取消</Button>
<Button
type={"primary"}
onClick={() => props.handleUpload({onCancel: cancel, id: props.id, fileList: fileList})}
>确认</Button>
</Space>
)}
>
<UploadPayVoucher fileList={[{name: '123', proveUrl: ''}]} />
<UploadPayVoucher id={settlementId} getFileList={getFileList} />
</Modal>
<div className={styles.modalBtn} onClick={show}>上传付款凭证</div>
</>
......@@ -141,8 +191,8 @@ const ChildrenComponent = {
}
const StatusActions: React.FC<Iprops> = (props: Iprops) => {
const { status } = props;
const Component = ChildrenComponent[status];
const { status, excludes = [] } = props;
const Component = excludes.includes(status) ? null : ChildrenComponent[status];
return (
<>
{Component && <Component {...props} />}
......
......@@ -12,19 +12,43 @@ import { UploadOutlined } from '@ant-design/icons'
import { UploadFile, UploadChangeParam } from 'antd/lib/upload/interface';
import { UPLOAD_TYPE } from '@/constants'
import { VoucherFileProps } from '../../common/type';
import { PublicApi } from '@/services/api';
interface Iprops {
fileList: VoucherFileProps[],
fileList?: VoucherFileProps[],
id: number, // 结算方id
getFileList: (params: any[]) => void
}
interface AccountInfo {
bankAccount: string,
name: string,
bankDeposit: string
}
const UploadPayVoucher: React.FC<Iprops> = (props) => {
const [fileList, setFileList] = useState([]);
const [loading, setLoading] = useState(false);
const [accountInfo, setAccountInfo] = useState<AccountInfo>(null)
// 进来设置fileList
// useEffect(() => {
// setFileList(props.fileList)
// }, [props.fileList])
/**
* 获取账户名称等
*/
useEffect(() => {
setFileList(props.fileList)
}, [props.fileList])
async function getAccountInfo() {
///settle/accounts/corporate/account/config
const { data, code } = await PublicApi.getSettleAccountsCorporateAccountConfig({memberId: props.id.toString()});
if(code == 1000) {
setAccountInfo(data);
}
}
getAccountInfo()
}, [props.id])
/***
* 上传前检查
......@@ -67,6 +91,7 @@ const UploadPayVoucher: React.FC<Iprops> = (props) => {
proveUrl: data
})
setFileList(temp);
props.getFileList(temp)
}
setLoading(false)
}
......@@ -78,15 +103,15 @@ const UploadPayVoucher: React.FC<Iprops> = (props) => {
<div className={styles.container}>
<div className={styles.formItem}>
<span className={styles.label}>账户名称</span>
<span className={styles.value}>温州市隆昌皮具有限公司</span>
<span className={styles.value}>{accountInfo?.name}</span>
</div>
<div className={styles.formItem}>
<span className={styles.label}>银行账号</span>
<span className={styles.value}>3214 454646 145 46 1231</span>
<span className={styles.value}>{accountInfo?.bankAccount}</span>
</div>
<div className={styles.formItem}>
<span className={styles.label}>开户行</span>
<span className={styles.value}>中国建设银行广州市分行营业部</span>
<span className={styles.value}>{accountInfo?.bankDeposit}</span>
</div>
<p className={styles.voucherText}>上传支付凭证</p>
<Voucher files={fileList} />
......
......@@ -15,12 +15,13 @@ interface Iprops {
const Voucher: React.FC<Iprops> = (props) => {
const { files = [] } = props;
console.log(files);
return (
<>
{
files.map((item: VoucherFileProps) => {
files.map((item: VoucherFileProps, key: number) => {
return (
<div className={styles.container}>
<div className={styles.container} key={key}>
{/* <div></div>/ */}
<div className={styles.image}>
<img src={image_icon} className={styles.icon} />
......@@ -28,7 +29,9 @@ const Voucher: React.FC<Iprops> = (props) => {
<div className={styles.text}>
<a href={item.proveUrl} target={"_blank"}>{item.name}</a>
</div>
<div className={styles.view}>预览</div>
<div className={styles.view}>
<a href={item.proveUrl} target={"_blank"}>预览</a>
</div>
</div>
)
})
......
......@@ -50,11 +50,15 @@ const AddRepository:React.FC<{}> = (props) => {
backIcon={<ReutrnEle description="返回"/>}
className='addRepository'
title={pageStatus === PageStatus.PREVIEW ? '查看仓位' : '新增仓位'}
extra={[
<Button key="1" onClick={() => addSchemaAction.submit()} type="primary" icon={<SaveOutlined />}>
保存
</Button>,
]}
extra={(
pageStatus !== PageStatus.PREVIEW
? (
<Button key="1" onClick={() => addSchemaAction.submit()} type="primary" icon={<SaveOutlined />}>
保存
</Button>
)
: null
)}
>
<Card className=''>
<PositionSetting addSchemaAction={addSchemaAction} schema={repositDetailSchema} formSubmit={formSubmit}/>
......
......@@ -21,7 +21,8 @@ import Search from '@/components/NiceForm/components/Search'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import { SHOP_TYPES, MALL_TYPE } from '@/constants';
import shop from '@/pages/lxMall/shop'
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
export interface PositionSettingProps {
addSchemaAction: ISchemaFormActions,
......@@ -80,17 +81,17 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
useEffect(() => {
// 拿到所有的角色等级, 根据shopType, 商品的类容重新拿
async function getMemberLevel() {
const response = await PublicApi.getMemberManagePageitems();
const response = await PublicApi.getMemberManagePageitems({roleTypeEnum: '2'});
const { levels = [], memberTypes = [], roles = [] } = response.data;
const allLevels = all.concat(transferLabelToValue(levels, "levelTag", "level"));
const allMemberTypes = all.concat(transferLabelToValue(memberTypes, "memberTypeName", "memberTypeId"))
// const allRoles = all.concat(transferLabelToValue(roles, "roleName", "roleId"))
const allRoles = all.concat(transferLabelToValue(roles, "roleName", "roleId"))
setMemberFilter((state) => {
return {
...state,
level: allLevels,
// role: allRoles,
role: allRoles,
type: allMemberTypes
}
})
......@@ -105,16 +106,11 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
const { data } = await PublicApi.getWarehouseFreightSpaceDetails({id: id});
if(data.isAllMemberShare === 0) {
const res = await getBindingMember({id: id.toString(), current: '1', pageSize: '10'});
addSchemaAction.setFieldState('isAllMemberShare', (state) => {
state.value = 0
})
addSchemaAction.setFieldState('applyMember', (state) => {
state.value = res.data
})
setMembersLength(res.totalCount);
setInitialValue({...data, applyMember: res.data});
} else {
setInitialValue(data)
}
console.log(data)
setInitialValue(data);
}
if(id != '') {
getInitValue();
......@@ -374,15 +370,15 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
}
},
// roleId: {
// type: 'string',
// "x-component": 'Select',
// "x-component-props": {
// options: membersFilterState.role,
// style: {width: '180px'},
// placeholder: '请选择会员角色'
// }
// },
roleId: {
type: 'string',
"x-component": 'Select',
"x-component-props": {
options: membersFilterState.role,
style: {width: '180px'},
placeholder: '请选择会员角色'
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
......
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