Commit 9e521012 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents 40bcc680 ff581fee
......@@ -10,6 +10,8 @@ import {
ORDER_TYPE_INQUIRY_CONTRACT,
ORDER_TYPE_BIDDING_CONTRACT,
ORDER_TYPE_TENDER_CONTRACT,
ORDER_TYPE_POINTS,
ORDER_TYPE_CHANNEL_POINTS,
} from '@/constants/order';
// 供应会员列表列
......@@ -78,10 +80,11 @@ const supplierSchema: ISchema = {
},
};
// 过滤积分订单,渠道积分订单
const orderTypeArr = GlobalConfig.web.orderType.map((item) => ({
label: item.platformWayName,
value: item.id,
}));
})).filter((item) => (item.value !== ORDER_TYPE_POINTS && item.value !== ORDER_TYPE_CHANNEL_POINTS));
export const addSchema = (orderType: number): ISchema => {
const isMateriel = (
......
......@@ -60,22 +60,26 @@ const ChannelRedirectTypeList = [
},
{
value: 2,
label: '积分',
label: '分类',
},
{
value: 3,
label: '资讯',
label: '积分',
},
{
value: 4,
label: '消息',
label: '资讯',
},
{
value: 5,
label: '进货单',
label: '消息',
},
{
value: 6,
label: '进货单',
},
{
value: 7,
label: '我的',
}
];
......
......@@ -28,7 +28,9 @@ const template = {
},
},
childComponentName: 'SimpleCommodityList.Item',
props: {},
props: {
title: '秒杀'
},
childNodes: [],
otherProps: {
type: 'flashSale'
......@@ -44,7 +46,9 @@ const template = {
type: "saleRankingItem"
},
},
props: {},
props: {
title: '品类销量排行'
},
childNodes: [],
otherProps: {
type: 'saleRanking'
......@@ -198,7 +202,9 @@ const tabContent: PageConfigType = {
title: '秒杀',
addBtnText: '添加秒杀商品',
childComponentName: 'SimpleCommodityList.Item',
props: {},
props: {
title: '秒杀'
},
childNodes: ["6-2-1"]
},
"6-2-1": {
......@@ -215,7 +221,9 @@ const tabContent: PageConfigType = {
title: '品类销量排行',
addBtnText: '添加销量排行商品',
childComponentName: 'SimpleCommodityList.Item',
props: {},
props: {
title: '品类销量排行'
},
childNodes: ["6-3-1"]
},
"6-3-1": {
......
......@@ -67,6 +67,7 @@ const EditPanel = () => {
message.info("请先选择一级导航类型");
}
const primaryTabProps = pageConfig[domKey!].props;
console.warn("fukc you", primaryTabProps)
setFormValue({
primary: primaryTabProps?.id,
title: primaryTabProps?.name,
......@@ -78,9 +79,14 @@ const EditPanel = () => {
const componentType: keyof typeof ComponentSchema = (selectedInfo as any)?.otherProps?.type;
const targetSchema = ComponentSchema[componentType] || null;
console.warn(selectedInfo, componentType)
if (targetSchema) {
/** 这里需要处理一下FormVlaue */
const tempFormValue = {
tabItem: {
primary: selectedInfo?.props?.id,
title: selectedInfo?.props?.title,
},
secondaryItem: {
secondary: selectedInfo?.props?.id,
title: selectedInfo?.props?.name,
......@@ -133,7 +139,6 @@ const EditPanel = () => {
message.info("当前商品展示类型为自动排序,不能进行单个商品设置");
return;
}
console.log(tempFormValue[componentType])
setFormValue(tempFormValue[componentType]);
setSchema(targetSchema);
......@@ -231,7 +236,7 @@ const EditPanel = () => {
setVisible(false);
handleOnClose();
/** 这里reset 是为了修改自定义组件在mutator.change 之后无法setValue 的bug */
formActions.reset();
// formActions.reset();
};
......@@ -264,7 +269,6 @@ const EditPanel = () => {
const hasSelectedTabKeys = Object.keys(sameKeyState).filter((_item) => /tabItem_\d+$/.test(_item));
formActions.setFieldState('layout.primary', (state) => {
const tempData = state.originAsyncData || [];
console.log(state);
FormPath.setIn(state, 'props.enum', tempData.map((_item) => {
return {
// ..._item,
......@@ -291,13 +295,13 @@ const EditPanel = () => {
categoryId: activeKey!.toString(),
memberId: userAuth.memberId.toString(),
}
const postData = isSelfMall ? omit(common, 'memberId') : common
const postData = isSelfMall ? {...common, memberRoleId: userAuth.memberRoleId.toString()} : common
const { data, code } = await service(postData as any);
if (code === 1000) {
// const source = data.map((_item) => ({label: _item.name, value: _item.id}));
const source = data?.map((_item) => ({label: _item.name, value: _item.id, disabled: sameKeyState[`tabItem_${activeKey}_secondary`].includes(_item.id)} ));
const source = data?.map((_item) => ({label: _item.name, value: _item.id, disabled: sameKeyState[`tabItem_${activeKey}_secondary`].includes(_item.id)} )) || [];
console.log("source", source)
formActions.setFieldState('secondary', (state) => {
state.originAsyncData = source;
FormPath.setIn(state, 'props.enum', source);
......
......@@ -126,9 +126,9 @@ const CategoryNavigation = () => {
categoryAdornContent: postData as any,
});
setLoading(false);
if (code === 1000) {
history.goBack();
}
// if (code === 1000) {
// history.goBack();
// }
// const { data, code }
};
......
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