Commit e76a0bc9 authored by 前端-李俊鑫's avatar 前端-李俊鑫
parents 81e900b8 ccabbf5e
......@@ -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)],
......
......@@ -54,6 +54,8 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => {
v.memberRoleId = item.offerMemberRoleId
v.orderMode = schemaAction.getFieldValue('orderMode')
v.shopId = schemaAction.getFieldValue('shopId')
// b2b询价下单 定价类型必定为2
v.priceType = 2
return v
})
......
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