Commit e9d2b8e7 authored by XieZhiXiong's avatar XieZhiXiong

chore: 完善逻辑

parent 64852fe1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-21 16:10:47 * @Date: 2021-05-21 16:10:47
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-07 16:49:23 * @LastEditTime: 2021-07-08 10:05:03
* @Description: 会员分类信息 * @Description: 会员分类信息
*/ */
import React, { useState } from 'react'; import React, { useState } from 'react';
...@@ -83,7 +83,8 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => { ...@@ -83,7 +83,8 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => {
} = props; } = props;
const [visibleDrawer, setVisibleDrawer] = useState(false); const [visibleDrawer, setVisibleDrawer] = useState(false);
const [classifyInfo, setClassifyInfo] = useState<FormValueType & { partnerTypes: PartnerTypesItem[] }>(); const [classifyInfo, setClassifyInfo] = useState<FormValueType>();
const [partnerTypes, setPartnerTypes] = useState<PartnerTypesItem[]>([]);
const [infoLoading, setInfoLoading] = useState(false); const [infoLoading, setInfoLoading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false); const [submitLoading, setSubmitLoading] = useState(false);
...@@ -111,8 +112,11 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => { ...@@ -111,8 +112,11 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => {
taxPoint: +taxPoint, taxPoint: +taxPoint,
...rest ...rest
})), })),
partnerTypes: res.data.partnerTypes,
}); });
setPartnerTypes(res.data.partnerTypes.map((item) => ({
value: item.id,
label: item.text,
})));
handleVisibleDrawer(true); handleVisibleDrawer(true);
} }
}).finally(() => { }).finally(() => {
...@@ -212,7 +216,7 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => { ...@@ -212,7 +216,7 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => {
onClose={() => handleVisibleDrawer(false)} onClose={() => handleVisibleDrawer(false)}
onSubmit={handleSubmit} onSubmit={handleSubmit}
submitLoading={submitLoading} submitLoading={submitLoading}
partnerTypes={classifyInfo?.partnerTypes} partnerTypes={partnerTypes}
value={classifyInfo} value={classifyInfo}
/> />
</> </>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-07-07 15:21:00 * @Date: 2021-07-07 15:21:00
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-07 18:12:33 * @LastEditTime: 2021-07-08 09:59:57
* @Description: 修改入库分类信息 抽屉 * @Description: 修改入库分类信息 抽屉
*/ */
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
...@@ -173,6 +173,9 @@ interface IProps { ...@@ -173,6 +173,9 @@ interface IProps {
* 合作关系 * 合作关系
*/ */
partnerTypes: PartnerTypesItem[], partnerTypes: PartnerTypesItem[],
/**
* 值
*/
value: FormValueType, value: FormValueType,
/** /**
* 确认按钮 loading * 确认按钮 loading
...@@ -193,6 +196,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => { ...@@ -193,6 +196,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
onSubmit, onSubmit,
onClose, onClose,
partnerTypes, partnerTypes,
value,
submitLoading, submitLoading,
} = props; } = props;
...@@ -310,6 +314,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => { ...@@ -310,6 +314,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
> >
<NiceForm <NiceForm
previewPlaceholder="' '" previewPlaceholder="' '"
initialValues={value}
components={{ components={{
ArrayCards, ArrayCards,
CascaderFormItem, CascaderFormItem,
......
...@@ -136,7 +136,7 @@ export const MEMBER_OUTER_COLUMNS: EditableColumns[] = [ ...@@ -136,7 +136,7 @@ export const MEMBER_OUTER_COLUMNS: EditableColumns[] = [
dataIndex: 'outerStatusName', dataIndex: 'outerStatusName',
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
<StatusTag type={MEMBER_INNER_STATUS_BADGE_COLOR[record.outerStatus]} title={text} /> <StatusTag type={MEMBER_OUTER_STATUS_TYPE[record.outerStatus]} title={text} />
), ),
}, },
{ {
......
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