Commit ccabbf5e authored by GuanHua's avatar GuanHua

fix: 店铺装修问题媳妇

parent 96b6db53
......@@ -6,6 +6,8 @@ export const searchBrandOptionEffect = (
shopId: any,
context: any,
fieldName: string,
memberId,
memberRoleId,
) => {
context.getFieldState(fieldName, state => {
PublicApi.getSearchCommodityTemplateGetBrandList({
......@@ -13,6 +15,8 @@ export const searchBrandOptionEffect = (
pageSize: '100',
name: state.props['x-component-props'].searchValue,
shopId,
memberId,
memberRoleId,
}).then(res => {
context.setFieldState(fieldName, state => {
state.props['x-component-props'].dataoption = res.data?.data?.map(item => {
......@@ -29,10 +33,14 @@ export const searchCustomerCategoryOptionEffect = (
shopId: any,
context: any,
fieldName: string,
memberId,
memberRoleId,
) => {
context.getFieldState(fieldName, state => {
PublicApi.getSearchCommodityTemplateGetFirstCategoryListByMemberId({
shopId,
memberId,
memberRoleId,
}).then(res => {
// PublicApi.getProductPlatformGetCategoryTree().then(res => {
context.setFieldState(fieldName, state => {
......
......@@ -14,7 +14,7 @@ import Submit from '@/components/NiceForm/components/Submit'
import StatusTag from '@/components/StatusTag'
import CustomInputSearch from '@/components/NiceForm/components/CustomInputSearch'
import CustomCategorySearch from '@/components/NiceForm/components/CustomCategorySearch'
import { getAuth } from '@/utils/auth'
import ActivityImage from '@/assets/couponIcons/ActivityImage.svg';
import styles from './index.less';
......@@ -46,6 +46,7 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
const [selectedRows, setSelectedRows] = useState<any>([]);
const [expandedRowKeys, setExpandedRowKeys] = useState<any>([]);
const ref = useRef<any>({});
const { memberId, memberRoleId } = getAuth() || {}
useEffect(() => {
setSelectedRowKeys(selectId ? [selectId] : []);
......@@ -210,10 +211,10 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
FORM_FILTER_PATH,
);
FormEffectHooks.onFieldChange$('brandId').subscribe(state => {
searchBrandOptionEffect(shopId, actions, 'brandId')
searchBrandOptionEffect(shopId, actions, 'brandId', memberId, memberRoleId)
})
FormEffectHooks.onFieldChange$('categoryId').subscribe(state => {
searchCustomerCategoryOptionEffect(shopId, actions, 'categoryId')
searchCustomerCategoryOptionEffect(shopId, actions, 'categoryId', memberId, memberRoleId)
})
},
components: { ModalSearch: Search, DateRangePickerUnix, Submit, CustomInputSearch, CustomCategorySearch },
......
......@@ -63,10 +63,10 @@ const RecommendCommodity: React.FC<RecommendCommodityProps> = (props: RecommendC
const _onChooseConfirm = (record) => {
const newList = [...dataList, ...record]
if (newList.length > 4) {
message.error('最多选择四件商品')
return
}
// if (newList.length > 4) {
// message.error('最多选择四件商品')
// return
// }
changeProps({
props: Object.assign({ ...props }, {
idList: [...idList, ...record.map((item) => item.id)],
......
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