Commit 2b5aba38 authored by XieZhiXiong's avatar XieZhiXiong

feat: 完成 会员入库 新增字段修改

parent 8f9958f6
......@@ -95,7 +95,43 @@ export type DocCategoryProps = Omit<CustomizeColumnProps, 'data' | 'columns'> &
* 税点,百分比的分子部分
*/
taxPoint: string,
/**
* 预付款
*/
advanceCharge: number,
/**
* 预付款名称
*/
advanceChargeName: string,
/**
* 结算单据
*/
settlementDocuments: number,
/**
* 结算单据名称
*/
settlementDocumentsName: string,
/**
* 付款方式
*/
paymentType: number,
/**
* 付款方式名称
*/
paymentTypeName: string,
}[],
/**
* 币别
*/
currencyType: number,
/**
* 币别名称
*/
currencyTypeName: string,
/**
* 备注
*/
remark: string,
},
/**
* 审核id
......@@ -149,6 +185,8 @@ const MemberDocCategory: React.FC<DocCategoryProps> = (props: DocCategoryProps)
taxPoint: +taxPoint * 100,
...rest
})),
currencyType: res.data?.currencyType,
remark: res.data?.remark,
});
setPartnerTypes(res.data?.partnerTypes.map((item) => ({
value: item.id,
......@@ -205,6 +243,17 @@ const MemberDocCategory: React.FC<DocCategoryProps> = (props: DocCategoryProps)
{
title: intl.formatMessage({ id: 'member.components.MemberDocCategory.partnerTypeName' }),
value: dataSource?.partnerTypeName || '',
},
{
title: '币别',
value: dataSource?.currencyTypeName || '',
columnProps: {
span: 2,
},
},
{
title: '备注',
value: dataSource?.remark || '',
columnProps: {
span: 3,
},
......@@ -219,12 +268,21 @@ const MemberDocCategory: React.FC<DocCategoryProps> = (props: DocCategoryProps)
<Descriptions.Item label={intl.formatMessage({ id: 'member.components.MemberDocCategory.category.name' })}>
{item.details?.map((item) => item.name).join(' / ')}
</Descriptions.Item>
<Descriptions.Item label="预付款">
{item.advanceChargeName}
</Descriptions.Item>
<Descriptions.Item label="结算单据">
{item.settlementDocumentsName}
</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({ id: 'member.components.MemberDocCategory.category.paymentDay' })}>
{`${item.payTypeName} `}
{item.month ? `${intl.formatMessage({ id: 'member.components.MemberDocCategory.month' }, { month: item.month })}` : ''}
{item.monthDay ? `${intl.formatMessage({ id: 'member.components.MemberDocCategory.monthDay' }, { monthDay: item.monthDay })}` : ''}
{item.days ? `${intl.formatMessage({ id: 'member.components.MemberDocCategory.days' }, { days: item.days })}` : ''}
</Descriptions.Item>
<Descriptions.Item label="付款方式">
{item.paymentTypeName}
</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({ id: 'member.components.MemberDocCategory.category.invoiceTypeName' })}>{item.invoiceTypeName}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({ id: 'member.components.MemberDocCategory.category.taxPoint' })}>{item.taxPoint}%</Descriptions.Item>
</Descriptions>
......
......@@ -80,6 +80,18 @@ type CategoriesType = {
* 税点,只要百分比的分子部分,不要转换为小数
*/
taxPoint: number,
/**
* 预付款
*/
advanceCharge: number,
/**
* 结算单据
*/
settlementDocuments: number,
/**
* 付款方式
*/
paymentType: number,
}
export type ValueType = {
......@@ -105,6 +117,14 @@ export type ValueType = {
cityCode: string,
}[],
/**
* 币别
*/
currencyType: number,
/**
* 备注
*/
remark: string,
/**
* 主营品类列表
*/
categories: CategoriesType[],
......@@ -159,6 +179,18 @@ export interface FormValueType extends Omit<ValueType, ('maxAmount' | 'categorie
* 税点,只要百分比的分子部分,不要转换为小数
*/
taxPoint: number,
/**
* 预付款
*/
advanceCharge: number,
/**
* 结算单据
*/
settlementDocuments: number,
/**
* 付款方式
*/
paymentType: number,
}[],
}
......@@ -278,6 +310,9 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
days: item.days ? +item.days : undefined,
invoiceType: item.invoiceType,
taxPoint: +item.taxPoint,
advanceCharge: item.advanceCharge,
settlementDocuments: item.settlementDocuments,
paymentType: item.paymentType,
};
});
onSubmit({
......@@ -466,7 +501,14 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
// 请求结算方式与发票类型数据
ITEMS_API_MAP[isVerify]().then(res => {
if (res.code === 1000 && res.data) {
const { payTypes = [], invoiceTypes } = res.data;
const {
payTypes = [],
invoiceTypes = [],
advanceCharges = [],
paymentTypes = [],
settlementDocuments = [],
currencyTypes = [],
} = res.data;
formActions.setFieldState('categories.*.payType', state => {
FormPath.setIn(state, 'props.enum', payTypes.map((item) => ({
label: item.payTypeName,
......@@ -479,6 +521,30 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
value: item.invoiceType,
})));
});
formActions.setFieldState('categories.*.advanceCharge', state => {
FormPath.setIn(state, 'props.enum', advanceCharges.map((item) => ({
label: item.advanceChargeTypeName,
value: item.advanceChargeType,
})));
});
formActions.setFieldState('categories.*.paymentType', state => {
FormPath.setIn(state, 'props.enum', paymentTypes.map((item) => ({
label: item.paymentTypeName,
value: item.paymentType,
})));
});
formActions.setFieldState('categories.*.settlementDocuments', state => {
FormPath.setIn(state, 'props.enum', settlementDocuments.map((item) => ({
label: item.settlementDocumentsTypeName,
value: item.settlementDocumentsType,
})));
});
formActions.setFieldState('currencyType', state => {
FormPath.setIn(state, 'props.enum', currencyTypes.map((item) => ({
label: item.currencyTypeName,
value: item.currencyType,
})));
});
}
}).catch((err) => {
console.warn(err);
......
......@@ -104,6 +104,30 @@ export const schema: ISchema = {
}
}
},
currencyType: {
type: 'string',
title: '币别',
enum: [],
'x-component-props': {
placeholder: '请选择',
},
required: true,
},
remark: {
type: 'string',
title: '备注',
'x-component': 'Textarea',
'x-component-props': {
placeholder: '在此输入你的内容,最长200个字符,100个汉字',
rows: 5,
},
'x-rules': [
{
limitByte: true, // 自定义校验规则
maxByte: 200,
}
],
},
categories: {
type: 'array',
title: intl.formatMessage({ id: 'member.management.memberPrComingClassify.drawer.form.classify.categories' }),
......@@ -176,6 +200,29 @@ export const schema: ISchema = {
// },
// },
// },
advanceCharge: {
type: 'string',
'x-component': 'Radio',
enum: [],
title: '预付款',
'x-rules': [
{
required: true,
message: '请选择预付款',
},
],
},
settlementDocuments: {
type: 'string',
title: '结算单据',
enum: [],
'x-rules': [
{
required: true,
message: '请选择结算单据',
},
],
},
payType: {
type: 'string',
enum: [],
......@@ -297,6 +344,17 @@ export const schema: ISchema = {
},
visible: false,
},
paymentType: {
type: 'string',
title: '付款方式',
enum: [],
'x-rules': [
{
required: true,
message: '请选择付款方式',
},
],
},
invoiceType: {
type: 'string',
enum: [],
......
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