Commit 37a261ca authored by XieZhiXiong's avatar XieZhiXiong
parents 7a9bbec3 4dd1c415
......@@ -23,6 +23,11 @@ import TableModal from '@/pages/transaction/components/tableModal';
import { ColumnType } from 'antd/lib/table/interface';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useLinkageUtils } from '@/utils/formEffectUtils';
import { FormEffectHooks } from '@formily/antd';
import { postManageWebShopWebAll } from '@/services/ManageV2Api';
import { GlobalConfig } from '@/global/config';
const { onFormMount$ } = FormEffectHooks;
const DetialLayout = () => {
const intl = useIntl();
......@@ -243,6 +248,19 @@ const DetialLayout = () => {
setTableModalVisible(flag)
}
const useStateEffects = () => {
const linkage = useLinkageUtils();
onFormMount$().subscribe(() => {
/** 活动类型 */
postManageWebShopWebAll({ siteId: GlobalConfig.global.siteInfo.id, hasMemberType: 1 }, { ctlType: 'none' }).then(res => {
const _enum = res.data.map((item) => { return { label: item.name, value: item.id } });
linkage.enum('shopId', _enum);
}).catch(err => {
console.warn(err)
})
})
}
return (
<Context.Provider value={dataSource}>
<PeripheralLayout
......@@ -306,6 +324,7 @@ const DetialLayout = () => {
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, "orderNo", FORM_FILTER_PATH)
useStateEffects()
}}
schema={{
type: 'object',
......
......@@ -23,6 +23,11 @@ import TableModal from '@/pages/transaction/components/tableModal';
import { ColumnType } from 'antd/lib/table/interface';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useLinkageUtils } from '@/utils/formEffectUtils';
import { FormEffectHooks } from '@formily/antd';
import { postManageWebShopWebAll } from '@/services/ManageV2Api';
import { GlobalConfig } from '@/global/config';
const { onFormMount$ } = FormEffectHooks;
const DetialLayout = () => {
const intl = useIntl();
......@@ -241,6 +246,19 @@ const DetialLayout = () => {
setTableModalVisible(flag)
}
const useStateEffects = () => {
const linkage = useLinkageUtils();
onFormMount$().subscribe(() => {
/** 活动类型 */
postManageWebShopWebAll({ siteId: GlobalConfig.global.siteInfo.id, hasMemberType: 1 }, { ctlType: 'none' }).then(res => {
const _enum = res.data.map((item) => { return { label: item.name, value: item.id } });
linkage.enum('shopId', _enum);
}).catch(err => {
console.warn(err)
})
})
}
return (
<Context.Provider value={dataSource}>
<PeripheralLayout
......@@ -304,6 +322,7 @@ const DetialLayout = () => {
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, "orderNo", FORM_FILTER_PATH)
useStateEffects()
}}
schema={{
type: 'object',
......
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