Commit a21333c1 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents 4997f61e 4e0b4725
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-24 10:32:10
* @LastEditTime: 2020-12-29 11:32:18
* @Description: 维修商品抽屉组件
*/
import React, { useState, useEffect } from 'react';
......@@ -248,7 +248,10 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
});
if (!payload.length) {
this.setState({ loading: false });
this.setState({
dataSource: orderListRes,
loading: false,
});
return;
}
......@@ -575,6 +578,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
</Button>
</div>
}
destroyOnClose
>
<div className={styles.order}>
<div className={styles['order-head']}>
......
......@@ -41,7 +41,10 @@ const Balance: React.FC<BalanceProps> = ({
const [loading, setLoading] = useState(false);
const getPayAssetAccountGetUserBalance = () => {
setLoading(false);
if (!purchaserId || !purchaserRoleId) {
return;
}
setLoading(true);
PublicApi.getPayAssetAccountGetChildUserBalance({
childMemberId: `${purchaserId}`,
childMemberRoleId: `${purchaserRoleId}`,
......
import React, { useState } from 'react';
import { Descriptions, Space, Button } from 'antd';
interface bankAccount {
id: number,
name: string,
bankAccount: string,
bankDeposit: string,
memberId: number,
};
interface BalanceProps {
/**
* 弹窗需要的数据值
*/
value: {[key: string]: any};
/**
* 关闭事件
*/
handleModalVisible: () => void;
/**
* 弹窗内确认事件
*/
handleConfirm: (values: {[key: string]: any}, modalName: string) => void;
/**
* 弹窗提交 loading
*/
submitLoading: boolean;
};
const Credit: React.FC<BalanceProps> = ({
handleModalVisible,
handleConfirm,
value,
submitLoading,
}) => {
const [bankAccount, setBankAccount] = useState<bankAccount>({
id: 0,
name: '',
bankAccount: '',
bankDeposit: '',
memberId: 0,
});
return (
<>
<Descriptions title="授信额度信息" column={1}>
<Descriptions.Item label="总授信额度">¥500000.00</Descriptions.Item>
<Descriptions.Item label="已用授信额度">¥500000.00</Descriptions.Item>
<Descriptions.Item label="可用授信额度">¥500000.00</Descriptions.Item>
<Descriptions.Item label="当前退款金额">
<span style={{ color: '#EF6260' }}>¥6000.00</span>
</Descriptions.Item>
</Descriptions>
<div style={{ marginTop: 20, textAlign: 'center' }}>
<Space>
<Button onClick={handleModalVisible}>
取消
</Button>
<Button
type="primary"
onClick={() => handleConfirm(value, 'credit')}
loading={submitLoading}
>
退款
</Button>
</Space>
</div>
</>
)
};
import React, { useState, useEffect } from 'react';
import { Descriptions, Space, Button, Spin } from 'antd';
import { PublicApi } from '@/services/api';
interface Credit {
quota: number,
useQuota: number,
canUseQuota: number,
isUsable: number,
};
interface BalanceProps {
/**
* 弹窗需要的数据值
*/
value: {[key: string]: any};
/**
* 关闭事件
*/
handleModalVisible: () => void;
/**
* 弹窗内确认事件
*/
handleConfirm: (values: {[key: string]: any}, modalName: string) => void;
/**
* 弹窗提交 loading
*/
submitLoading: boolean;
/**
* 采购商id
*/
purchaserId: number,
/**
* 采购商角色id
*/
purchaserRoleId: number,
/**
* 供应商id
*/
supplierId: number,
/**
* 供应商角色id
*/
supplierRoleId: number,
};
const Credit: React.FC<BalanceProps> = ({
handleModalVisible,
handleConfirm,
value,
submitLoading,
purchaserId,
purchaserRoleId,
supplierId,
supplierRoleId,
}) => {
const [credit, setCredit] = useState<Credit>({
quota: 0,
useQuota: 0,
canUseQuota: 0,
isUsable: 0,
});
const [loading, setLoading] = useState(false);
const getMemberCredit = () => {
if (
!purchaserId ||
!purchaserRoleId ||
!supplierId ||
!supplierRoleId
) {
return;
}
setLoading(true);
PublicApi.getPayCreditGetMemberCredit({
memberId: `${purchaserId}`,
roleId: `${purchaserRoleId}`,
parentMemberId: `${supplierId}`,
parentMemberRoleId: `${supplierRoleId}`,
}).then(res => {
if (res.code === 1000) {
setCredit(res.data);
}
}).finally(() => {
setLoading(false);
});
};
useEffect(() => {
getMemberCredit();
}, []);
return (
<Spin spinning={loading}>
<Descriptions title="授信额度信息" column={1}>
<Descriptions.Item label="总授信额度">{credit.quota}</Descriptions.Item>
<Descriptions.Item label="已用授信额度">{credit.useQuota}</Descriptions.Item>
<Descriptions.Item label="可用授信额度">{credit.canUseQuota}</Descriptions.Item>
<Descriptions.Item label="当前退款金额">
<span style={{ color: '#EF6260' }}>{value.refundAmount}</span>
</Descriptions.Item>
</Descriptions>
<div style={{ marginTop: 20, textAlign: 'center' }}>
<Space>
<Button onClick={handleModalVisible}>
取消
</Button>
<Button
type="primary"
onClick={() => handleConfirm(value, 'credit')}
loading={submitLoading}
>
退款
</Button>
</Space>
</div>
</Spin>
)
};
export default Credit;
\ No newline at end of file
......@@ -7,10 +7,11 @@ import { uploadVoucherModalSchema } from './schema';
const uploadVoucherFormActions = createFormActions();
interface bankAccount {
interface BankAccount {
name: string,
bankAccount: string,
bankDeposit: string,
id: number,
};
interface UploadVoucherProps {
......@@ -48,22 +49,23 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
purchaserId,
purchaserRoleId,
}) => {
const [bankAccount, setBankAccount] = useState<bankAccount>({
const [bankAccount, setBankAccount] = useState<BankAccount>({
name: '',
bankAccount: '',
bankDeposit: '',
id: 0,
});
const [loading, setLoading] = useState(false);
// 获取对公账户信息
const getSettleAccountsCorporateAccountConfig = (memberId: number, memberRoleId: number) => {
if (!memberId || !memberRoleId) {
const getSettleAccountsGetMemberAccountConfig = () => {
if (!purchaserId || !purchaserRoleId) {
return;
}
setLoading(true);
PublicApi.getSettleAccountsCorporateAccountConfig({
memberId: `${memberId}`,
memberRoleId: `${memberRoleId}`,
PublicApi.getSettleAccountsGetMemberAccountConfig({
memberId: `${purchaserId}`,
roleId: `${purchaserRoleId}`,
}).then(res => {
if (res.code === 1000) {
setBankAccount(res.data);
......@@ -74,11 +76,10 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
};
useEffect(() => {
getSettleAccountsCorporateAccountConfig(purchaserId, purchaserRoleId);
getSettleAccountsGetMemberAccountConfig();
}, []);
const beforeUploadVoucher = file => {
console.log(file.size)
if (file.size / 1024 > 200) {
message.warning('图片大小超过200K');
return Promise.reject();
......@@ -86,17 +87,17 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
};
const handleUploadVoucherSubmit = values => {
const { fileList = [] } = values;
const { fileList = [], id, ...rest } = values;
if (handleConfirm) {
if (!bankAccount || !bankAccount.name) {
if (!bankAccount || !bankAccount.id) {
message.error('没有收款账户相关信息,无法退款');
return;
}
handleConfirm({
...value,
payProve: {
...values,
...rest,
fileList: fileList.map(item => item.status === 'done' && ({
name: item.name,
proveUrl: item.data.url,
......@@ -110,7 +111,7 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
<Spin spinning={loading}>
<NiceForm
previewPlaceholder=""
initialValues={bankAccount}
value={bankAccount}
effects={($, { setFieldState }) => {
}}
......
......@@ -41,6 +41,13 @@ const RefundModal: React.FC<RefundModalProps> = ({
value,
submitLoading,
}) => {
const {
purchaserId,
purchaserRoleId,
supplierId,
supplierRoleId,
...rest
} = value;
const tempMap = {
uploadVoucher: {
......@@ -49,9 +56,9 @@ const RefundModal: React.FC<RefundModalProps> = ({
render: () => (
<Suspense fallback={null}>
<UploadVoucher
value={value}
purchaserId={value.purchaserId}
purchaserRoleId={value.purchaserRoleId}
value={rest}
purchaserId={purchaserId}
purchaserRoleId={purchaserRoleId}
handleConfirm={handleConfirm}
handleModalVisible={handleModalVisible}
submitLoading={submitLoading}
......@@ -65,7 +72,9 @@ const RefundModal: React.FC<RefundModalProps> = ({
render: () => (
<Suspense fallback={null}>
<Balance
value={value}
value={rest}
purchaserId={purchaserId}
purchaserRoleId={purchaserRoleId}
handleConfirm={handleConfirm}
handleModalVisible={handleModalVisible}
submitLoading={submitLoading}
......@@ -79,7 +88,11 @@ const RefundModal: React.FC<RefundModalProps> = ({
render: () => (
<Suspense fallback={null}>
<Credit
value={value}
value={rest}
purchaserId={purchaserId}
purchaserRoleId={purchaserRoleId}
supplierId={supplierId}
supplierRoleId={supplierRoleId}
handleConfirm={handleConfirm}
handleModalVisible={handleModalVisible}
submitLoading={submitLoading}
......@@ -93,7 +106,7 @@ const RefundModal: React.FC<RefundModalProps> = ({
render: () => (
<Suspense fallback={null}>
<COD
value={value}
value={rest}
handleConfirm={handleConfirm}
handleModalVisible={handleModalVisible}
submitLoading={submitLoading}
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 18:02:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-28 13:53:00
* @LastEditTime: 2020-12-29 11:00:22
* @Description: 退款明细
*/
import React, { useState } from 'react';
......@@ -66,6 +66,14 @@ interface ReturnDetailInfoProps {
* 采购商角色id
*/
purchaserRoleId: number,
/**
* 供应商id
*/
supplierId: number,
/**
* 供应商角色id
*/
supplierRoleId: number,
};
const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
......@@ -76,6 +84,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
innerStatus,
purchaserId,
purchaserRoleId,
supplierId,
supplierRoleId,
}) => {
const [visibleResult, setVisibleResult] = useState(false);
const [notReceivedLoading, setNotReceivedLoading] = useState(false);
......@@ -159,21 +169,37 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
case PAY_CHANNEL_BALANCE: {
setModalName('balance');
setRefundModalVisible(true);
setRefundModalValue({ id, refundAmount: amount });
setRefundModalValue({
id,
refundAmount: amount,
purchaserId,
purchaserRoleId,
});
break;
};
// 线下支付
case PAY_CHANNEL_OFFLINE: {
setModalName('uploadVoucher');
setRefundModalVisible(true);
setRefundModalValue({ id, purchaserId, purchaserRoleId });
setRefundModalValue({
id,
purchaserId,
purchaserRoleId,
});
break;
};
// 授信支付
case PAY_CHANNEL_CREDIT: {
setModalName('credit');
setRefundModalVisible(true);
setRefundModalValue({ id, refundAmount: amount });
setRefundModalValue({
id,
refundAmount: amount,
purchaserId,
purchaserRoleId,
supplierId,
supplierRoleId,
});
break;
};
// 货到付款
......
......@@ -29,6 +29,7 @@ const addSchemaAction = createFormActions();
const {
onFormInputChange$,
onFormInit$,
onFieldInputChange$,
} = FormEffectHooks;
interface BillsFormProps {
......@@ -528,6 +529,10 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
});
}
});
onFieldInputChange$('supplierMember').subscribe(() => {
setGoodsValue([]);
});
}}
onSubmit={handleSubmit}
actions={addSchemaAction}
......
......@@ -418,6 +418,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
innerStatus={detailInfo?.innerStatus}
purchaserId={detailInfo?.memberId}
purchaserRoleId={detailInfo?.roleId}
supplierId={detailInfo?.parentMemberId}
supplierRoleId={detailInfo?.parentMemberRoleId}
isPurchaser
/>
</Suspense>
......@@ -468,8 +470,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
</Col>
<Col span={24}>
{/* 内、外部流转记录 */}
<Suspense fallback={null}>
{/* 内、外部流转记录 */}
<Suspense fallback={null}>
<FlowRecords
fetchOuterHistory={fetchOuterHistory}
fetchInnerHistory={fetchInnerHistory}
......
......@@ -465,6 +465,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
innerStatus={detailInfo?.innerStatus}
purchaserId={detailInfo?.memberId}
purchaserRoleId={detailInfo?.roleId}
supplierId={detailInfo?.parentMemberId}
supplierRoleId={detailInfo?.parentMemberRoleId}
/>
</Suspense>
</Col>
......
import React, { Suspense, useEffect, useState } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
Badge,
message,
} from 'antd';
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import lodash from 'lodash';
import { PublicApi } from '@/services/api';
import { GetPayCreditApplyGetApplyDetailResponse } from '@/services/PayApi';
import { CREDIT_INNER_STATUS, CREDIT_OUTER_STATUS, CREDIT_STATUS } from '@/constants';
import { normalizeFiledata, FileData } from '@/utils';
import AvatarWrap from '@/components/AvatarWrap';
import StatusTag from '@/components/StatusTag';
import { CREDIT_STATUS_TAG_MAP, CREDIT_OUTER_STATUS_TAG_MAP, CREDIT_INNER_STATUS_BADGE_MAP } from '../../../constant';
const OuterCirculation = React.lazy(() => import('../OuterCirculation'));
const QuotaApplicationInfo = React.lazy(() => import('../QuotaApplicationInfo'));
const HitoryList = React.lazy(() => import('../HistoryList'));
const OuterCirculationRecord = React.lazy(() => import('../OuterCirculationRecord'));
interface DetailInfoProps {
// 申请id
id: string;
// 授信id
creditId: string;
// 是否是编辑的
isEdit?: boolean;
// 历史记录目标路径
target?: string;
};
interface QuotaValues {
// 申请调整额度
applyQuota: number | null;
// 申请调整账单日期
billDay: number | null;
// 申请还款周期
repayPeriod: number | null;
// 申请附件
fileList: FileData[];
};
const DetailInfo: React.FC<DetailInfoProps> = ({
id,
creditId,
isEdit = false,
target,
}) => {
const [quotaInfo, setQuotaInfo] = useState<GetPayCreditApplyGetApplyDetailResponse>(null);
const [quotaValues, setQuotaValues] = useState<QuotaValues>({
applyQuota: null,
billDay: null,
repayPeriod: null,
fileList: [],
});
const [infoLoading, setInfoloading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
// 获取授信详情
const getQuotaInfo = () => {
if (!id) {
return;
}
setInfoloading(true);
PublicApi.getPayCreditApplyGetApplyDetail({
applyId: id,
creditId,
}).then(res => {
if (res.code === 1000) {
setQuotaInfo(res.data);
setQuotaValues({
applyQuota: res.data.apply.applyQuota,
billDay: res.data.apply.billDay,
repayPeriod: res.data.apply.repayPeriod,
fileList: res.data.apply.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [],
});
}
}).finally(() => {
setInfoloading(false);
});
};
useEffect(() => {
getQuotaInfo();
}, []);
// 调整授信申请信息
const handleQuotaSubmit = (values) => {
setQuotaValues(values);
};
const handleSubmit = () => {
setSubmitLoading(true);
const { fileList, ...rest } = quotaValues;
PublicApi.postPayCreditApplyAddCreditApply({
applyId: +id,
creditId: creditId ? +creditId : 0,
fileList: fileList.map((item: any) => ({ name: item.name, fileUrl: item.data })),
...rest,
}).then(res => {
if (res.code === 1000) {
setTimeout(() => {
history.goBack();
}, 800);
}
}).finally(() => {
setSubmitLoading(false);
});
};
return (
<Spin spinning={infoLoading}>
<PageHeaderWrapper
style={{
padding: 24,
}}
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
aloneTxt: '单',
name: `申请单号:${quotaInfo && quotaInfo.member ? quotaInfo.member.applyNo : ''}`,
}}
extra={quotaInfo && quotaInfo.member ? quotaInfo.member.levelTag || '' : ''}
/>
}
extra={(
<>
{isEdit && (
<Button
type="primary"
onClick={handleSubmit}
loading={submitLoading}
>
提交
</Button>
)}
</>
)}
>
<Descriptions
size="small"
column={3}
style={{
padding: '0 32px',
}}
>
<Descriptions.Item label="会员归属">{quotaInfo?.member?.parentMemberName}</Descriptions.Item>
<Descriptions.Item label="会员类型">{quotaInfo?.member?.memberTypeName}</Descriptions.Item>
<Descriptions.Item label="会员角色名称">{quotaInfo?.member?.roleName}</Descriptions.Item>
<Descriptions.Item label="会员状态">
<StatusTag
type={CREDIT_STATUS_TAG_MAP[quotaInfo && quotaInfo.member ? quotaInfo.member.status : 'default']}
title={quotaInfo && quotaInfo.member ? CREDIT_STATUS[quotaInfo.member.status] : ''}
/>
</Descriptions.Item>
<Descriptions.Item label="外部状态">
<StatusTag type={CREDIT_OUTER_STATUS_TAG_MAP[quotaInfo?.member.outerStatus]} title={CREDIT_OUTER_STATUS[quotaInfo?.member.outerStatus]} />
</Descriptions.Item>
<Descriptions.Item label="内部状态">
<Badge color={CREDIT_INNER_STATUS_BADGE_MAP[quotaInfo?.member.innerStatus]} text={CREDIT_INNER_STATUS[quotaInfo?.member.innerStatus]} />
</Descriptions.Item>
</Descriptions>
</PageHeader>
</>
}
>
<Suspense fallback={null}>
<OuterCirculation
steps={
quotaInfo && quotaInfo.outerTaskList ?
quotaInfo.outerTaskList.map(item => ({
title: item.taskName,
description: item.roleName,
})) :
[]
}
current={quotaInfo && quotaInfo.outerTaskList ? quotaInfo && quotaInfo.outerTaskList.findIndex(item => item.isExecute === 0) : 0}
/>
</Suspense>
<Suspense fallback={null}>
<QuotaApplicationInfo
quotaInfo={{
originalQuota: quotaInfo?.apply.originalQuota,
applyQuota: quotaValues.applyQuota,
billDay: quotaValues.billDay,
repayPeriod: quotaValues.repayPeriod,
applyTime: quotaInfo?.apply.applyTime,
fileList: quotaValues.fileList,
}}
verify={
quotaInfo &&
quotaInfo.verify &&
lodash.isNumber(quotaInfo.verify.quota) ? {
quota: quotaInfo?.verify?.quota,
billDay: quotaInfo?.verify?.billDay,
repayPeriod: quotaInfo?.verify?.repayPeriod,
verifyTime: quotaInfo?.verify?.verifyTime,
maxApplyQuota: quotaInfo?.verify?.maxApplyQuota,
} :
null
}
editable={isEdit}
onSubmit={handleQuotaSubmit}
/>
</Suspense>
<Suspense fallback={null}>
<HitoryList
dataSource={quotaInfo?.historyApplyList}
target={target}
/>
</Suspense>
<Suspense fallback={null}>
<OuterCirculationRecord dataSource={quotaInfo?.outerVerifyRecordList} />
</Suspense>
</PageHeaderWrapper>
</Spin>
);
};
import React, { Suspense, useEffect, useState } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
Badge,
message,
} from 'antd';
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import lodash from 'lodash';
import { PublicApi } from '@/services/api';
import { GetPayCreditApplyGetApplyDetailResponse } from '@/services/PayApi';
import { CREDIT_INNER_STATUS, CREDIT_OUTER_STATUS, CREDIT_STATUS } from '@/constants';
import { normalizeFiledata, FileData } from '@/utils';
import AvatarWrap from '@/components/AvatarWrap';
import StatusTag from '@/components/StatusTag';
import { CREDIT_STATUS_TAG_MAP, CREDIT_OUTER_STATUS_TAG_MAP, CREDIT_INNER_STATUS_BADGE_MAP } from '../../../constant';
const OuterCirculation = React.lazy(() => import('../OuterCirculation'));
const QuotaApplicationInfo = React.lazy(() => import('../QuotaApplicationInfo'));
const HitoryList = React.lazy(() => import('../HistoryList'));
const OuterCirculationRecord = React.lazy(() => import('../OuterCirculationRecord'));
interface DetailInfoProps {
// 申请id
id: string;
// 授信id
creditId: string;
// 是否是编辑的
isEdit?: boolean;
// 历史记录目标路径
target?: string;
};
interface QuotaValues {
// 申请调整额度
applyQuota: number | null;
// 申请调整账单日期
billDay: number | null;
// 申请还款周期
repayPeriod: number | null;
// 申请附件
fileList: FileData[];
};
const DetailInfo: React.FC<DetailInfoProps> = ({
id,
creditId,
isEdit = false,
target,
}) => {
const [quotaInfo, setQuotaInfo] = useState<GetPayCreditApplyGetApplyDetailResponse>(null);
const [quotaValues, setQuotaValues] = useState<QuotaValues>({
applyQuota: null,
billDay: null,
repayPeriod: null,
fileList: [],
});
const [infoLoading, setInfoloading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
// 获取授信详情
const getQuotaInfo = () => {
if (!id) {
return;
}
setInfoloading(true);
PublicApi.getPayCreditApplyGetApplyDetail({
applyId: id,
creditId,
}).then(res => {
if (res.code === 1000) {
setQuotaInfo(res.data);
setQuotaValues({
applyQuota: res.data.apply.applyQuota,
billDay: res.data.apply.billDay,
repayPeriod: res.data.apply.repayPeriod,
fileList: res.data.apply.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [],
});
}
}).finally(() => {
setInfoloading(false);
});
};
useEffect(() => {
getQuotaInfo();
}, []);
// 调整授信申请信息
const handleQuotaSubmit = (values) => {
setQuotaValues(values);
};
const handleSubmit = () => {
setSubmitLoading(true);
const { fileList, ...rest } = quotaValues;
PublicApi.postPayCreditApplyAddCreditApply({
applyId: +id,
creditId: creditId ? +creditId : 0,
fileList: fileList.map((item: any) => ({ name: item.name, fileUrl: item.data.url })),
...rest,
}).then(res => {
if (res.code === 1000) {
setTimeout(() => {
history.replace('/memberCenter/payandSettle/creditApplication/quotaPrSubmit');
}, 800);
}
}).finally(() => {
setSubmitLoading(false);
});
};
return (
<Spin spinning={infoLoading}>
<PageHeaderWrapper
style={{
padding: 24,
}}
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
aloneTxt: '单',
name: `申请单号:${quotaInfo && quotaInfo.member ? quotaInfo.member.applyNo : ''}`,
}}
extra={quotaInfo && quotaInfo.member ? quotaInfo.member.levelTag || '' : ''}
/>
}
extra={(
<>
{isEdit && (
<Button
type="primary"
onClick={handleSubmit}
loading={submitLoading}
>
提交
</Button>
)}
</>
)}
>
<Descriptions
size="small"
column={3}
style={{
padding: '0 32px',
}}
>
<Descriptions.Item label="会员归属">{quotaInfo?.member?.parentMemberName}</Descriptions.Item>
<Descriptions.Item label="会员类型">{quotaInfo?.member?.memberTypeName}</Descriptions.Item>
<Descriptions.Item label="会员角色名称">{quotaInfo?.member?.roleName}</Descriptions.Item>
<Descriptions.Item label="会员状态">
<StatusTag
type={CREDIT_STATUS_TAG_MAP[quotaInfo && quotaInfo.member ? quotaInfo.member.status : 'default']}
title={quotaInfo && quotaInfo.member ? CREDIT_STATUS[quotaInfo.member.status] : ''}
/>
</Descriptions.Item>
<Descriptions.Item label="外部状态">
<StatusTag type={CREDIT_OUTER_STATUS_TAG_MAP[quotaInfo?.member.outerStatus]} title={CREDIT_OUTER_STATUS[quotaInfo?.member.outerStatus]} />
</Descriptions.Item>
<Descriptions.Item label="内部状态">
<Badge color={CREDIT_INNER_STATUS_BADGE_MAP[quotaInfo?.member.innerStatus]} text={CREDIT_INNER_STATUS[quotaInfo?.member.innerStatus]} />
</Descriptions.Item>
</Descriptions>
</PageHeader>
</>
}
>
<Suspense fallback={null}>
<OuterCirculation
steps={
quotaInfo && quotaInfo.outerTaskList ?
quotaInfo.outerTaskList.map(item => ({
title: item.taskName,
description: item.roleName,
})) :
[]
}
current={quotaInfo && quotaInfo.outerTaskList ? quotaInfo && quotaInfo.outerTaskList.findIndex(item => item.isExecute === 0) : 0}
/>
</Suspense>
<Suspense fallback={null}>
<QuotaApplicationInfo
quotaInfo={{
originalQuota: quotaInfo?.apply.originalQuota,
applyQuota: quotaValues.applyQuota,
billDay: quotaValues.billDay,
repayPeriod: quotaValues.repayPeriod,
applyTime: quotaInfo?.apply.applyTime,
fileList: quotaValues.fileList,
}}
verify={
quotaInfo &&
quotaInfo.verify &&
lodash.isNumber(quotaInfo.verify.quota) ? {
quota: quotaInfo?.verify?.quota,
billDay: quotaInfo?.verify?.billDay,
repayPeriod: quotaInfo?.verify?.repayPeriod,
verifyTime: quotaInfo?.verify?.verifyTime,
maxApplyQuota: quotaInfo?.verify?.maxApplyQuota,
} :
null
}
editable={isEdit}
onSubmit={handleQuotaSubmit}
/>
</Suspense>
<Suspense fallback={null}>
<HitoryList
dataSource={quotaInfo?.historyApplyList}
target={target}
/>
</Suspense>
<Suspense fallback={null}>
<OuterCirculationRecord dataSource={quotaInfo?.outerVerifyRecordList} />
</Suspense>
</PageHeaderWrapper>
</Spin>
);
};
export default DetailInfo;
\ No newline at end of file
......@@ -66,31 +66,26 @@ export const billsSchema: ISchema = {
invoicesType: {
type: 'string',
'x-component-props': {
placeholder: '请选择单据类型',
placeholder: '单据类型',
allowClear: true,
},
enum: [],
},
inventory: {
type: 'string',
'x-component-props': {
placeholder: '请选择对应仓库',
placeholder: '对应仓库',
allowClear: true,
},
enum: [],
},
transactionTime: {
'[startTransactionTime, endTransactionTime]': {
type: 'string',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '请选择交易时间',
placeholder: '交易时间',
allowClear: true,
},
enum: [
{ label: '今天', value: 1 },
{ label: '一周内', value: 2 },
{ label: '一个月内', value: 3 },
{ label: '三个月内', value: 4 },
{ label: '六个月内', value: 5 },
{ label: '一年内', value: 6 },
{ label: '一年前', value: 7 },
],
},
submit: {
'x-component': 'Submit',
......
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