Commit e76a0bc9 authored by 前端-李俊鑫's avatar 前端-李俊鑫
parents 81e900b8 ccabbf5e
...@@ -6,6 +6,8 @@ export const searchBrandOptionEffect = ( ...@@ -6,6 +6,8 @@ export const searchBrandOptionEffect = (
shopId: any, shopId: any,
context: any, context: any,
fieldName: string, fieldName: string,
memberId,
memberRoleId,
) => { ) => {
context.getFieldState(fieldName, state => { context.getFieldState(fieldName, state => {
PublicApi.getSearchCommodityTemplateGetBrandList({ PublicApi.getSearchCommodityTemplateGetBrandList({
...@@ -13,6 +15,8 @@ export const searchBrandOptionEffect = ( ...@@ -13,6 +15,8 @@ export const searchBrandOptionEffect = (
pageSize: '100', pageSize: '100',
name: state.props['x-component-props'].searchValue, name: state.props['x-component-props'].searchValue,
shopId, shopId,
memberId,
memberRoleId,
}).then(res => { }).then(res => {
context.setFieldState(fieldName, state => { context.setFieldState(fieldName, state => {
state.props['x-component-props'].dataoption = res.data?.data?.map(item => { state.props['x-component-props'].dataoption = res.data?.data?.map(item => {
...@@ -29,10 +33,14 @@ export const searchCustomerCategoryOptionEffect = ( ...@@ -29,10 +33,14 @@ export const searchCustomerCategoryOptionEffect = (
shopId: any, shopId: any,
context: any, context: any,
fieldName: string, fieldName: string,
memberId,
memberRoleId,
) => { ) => {
context.getFieldState(fieldName, state => { context.getFieldState(fieldName, state => {
PublicApi.getSearchCommodityTemplateGetFirstCategoryListByMemberId({ PublicApi.getSearchCommodityTemplateGetFirstCategoryListByMemberId({
shopId, shopId,
memberId,
memberRoleId,
}).then(res => { }).then(res => {
// PublicApi.getProductPlatformGetCategoryTree().then(res => { // PublicApi.getProductPlatformGetCategoryTree().then(res => {
context.setFieldState(fieldName, state => { context.setFieldState(fieldName, state => {
......
...@@ -14,7 +14,7 @@ import Submit from '@/components/NiceForm/components/Submit' ...@@ -14,7 +14,7 @@ import Submit from '@/components/NiceForm/components/Submit'
import StatusTag from '@/components/StatusTag' import StatusTag from '@/components/StatusTag'
import CustomInputSearch from '@/components/NiceForm/components/CustomInputSearch' import CustomInputSearch from '@/components/NiceForm/components/CustomInputSearch'
import CustomCategorySearch from '@/components/NiceForm/components/CustomCategorySearch' import CustomCategorySearch from '@/components/NiceForm/components/CustomCategorySearch'
import { getAuth } from '@/utils/auth'
import ActivityImage from '@/assets/couponIcons/ActivityImage.svg'; import ActivityImage from '@/assets/couponIcons/ActivityImage.svg';
import styles from './index.less'; import styles from './index.less';
...@@ -46,6 +46,7 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP ...@@ -46,6 +46,7 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
const [selectedRows, setSelectedRows] = useState<any>([]); const [selectedRows, setSelectedRows] = useState<any>([]);
const [expandedRowKeys, setExpandedRowKeys] = useState<any>([]); const [expandedRowKeys, setExpandedRowKeys] = useState<any>([]);
const ref = useRef<any>({}); const ref = useRef<any>({});
const { memberId, memberRoleId } = getAuth() || {}
useEffect(() => { useEffect(() => {
setSelectedRowKeys(selectId ? [selectId] : []); setSelectedRowKeys(selectId ? [selectId] : []);
...@@ -210,10 +211,10 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP ...@@ -210,10 +211,10 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
FORM_FILTER_PATH, FORM_FILTER_PATH,
); );
FormEffectHooks.onFieldChange$('brandId').subscribe(state => { FormEffectHooks.onFieldChange$('brandId').subscribe(state => {
searchBrandOptionEffect(shopId, actions, 'brandId') searchBrandOptionEffect(shopId, actions, 'brandId', memberId, memberRoleId)
}) })
FormEffectHooks.onFieldChange$('categoryId').subscribe(state => { FormEffectHooks.onFieldChange$('categoryId').subscribe(state => {
searchCustomerCategoryOptionEffect(shopId, actions, 'categoryId') searchCustomerCategoryOptionEffect(shopId, actions, 'categoryId', memberId, memberRoleId)
}) })
}, },
components: { ModalSearch: Search, DateRangePickerUnix, Submit, CustomInputSearch, CustomCategorySearch }, components: { ModalSearch: Search, DateRangePickerUnix, Submit, CustomInputSearch, CustomCategorySearch },
......
...@@ -63,10 +63,10 @@ const RecommendCommodity: React.FC<RecommendCommodityProps> = (props: RecommendC ...@@ -63,10 +63,10 @@ const RecommendCommodity: React.FC<RecommendCommodityProps> = (props: RecommendC
const _onChooseConfirm = (record) => { const _onChooseConfirm = (record) => {
const newList = [...dataList, ...record] const newList = [...dataList, ...record]
if (newList.length > 4) { // if (newList.length > 4) {
message.error('最多选择四件商品') // message.error('最多选择四件商品')
return // return
} // }
changeProps({ changeProps({
props: Object.assign({ ...props }, { props: Object.assign({ ...props }, {
idList: [...idList, ...record.map((item) => item.id)], idList: [...idList, ...record.map((item) => item.id)],
......
...@@ -54,6 +54,8 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => { ...@@ -54,6 +54,8 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => {
v.memberRoleId = item.offerMemberRoleId v.memberRoleId = item.offerMemberRoleId
v.orderMode = schemaAction.getFieldValue('orderMode') v.orderMode = schemaAction.getFieldValue('orderMode')
v.shopId = schemaAction.getFieldValue('shopId') v.shopId = schemaAction.getFieldValue('shopId')
// b2b询价下单 定价类型必定为2
v.priceType = 2
return v 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