Commit aa834097 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:商品渠道商品字段变更

parent cdc196fd
......@@ -229,12 +229,12 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
<Form.Item
name="brandId"
label="商品品牌"
rules={[
{
required: true,
message: '请选择商品品牌'
}
]}
// rules={[
// {
// required: true,
// message: '请选择商品品牌'
// }
// ]}
>
<Select
disabled={!isUpdateAttribute}
......
......@@ -38,12 +38,14 @@ interface Item {
interface paramItem {
name: string;
code: string;
priceType: number;
priceType?: number;
priceTypeList: number[];
min: number;
max: number;
brandId: number;
customerCategoryId: number;
status: number;
status?: number;
statusList: number[];
}
let timeChange: any;
......@@ -69,11 +71,13 @@ const Products: React.FC<{}> = () => {
name: '',
code: '',
priceType: null,
priceTypeList: null,
min: null,
max: null,
brandId: 0,
customerCategoryId: 0,
status: null,
statusList: null,
})
const [brandData, setBrandData] = useState<any>([])
const [brandValue, setBrandValue] = useState(undefined)
......@@ -245,7 +249,6 @@ const Products: React.FC<{}> = () => {
}
const fetchData = (params: any) => {
console.log(params, filterParams)
return new Promise((resolve, reject) => {
PublicApi.getProductCommodityGetCommodityList({ ...filterParams, ...params}).then(res => {
console.log(res, 'res')
......@@ -256,7 +259,6 @@ const Products: React.FC<{}> = () => {
}
const handleSee = (record: any) => {
console.log('see')
history.push(`/memberCenter/commodityAbility/commodity/products/viewProducts?id=${record.id}`)
}
......@@ -562,7 +564,7 @@ const Products: React.FC<{}> = () => {
}
const handleReset = () => {
let restObj = { name: '', code: '', max: null, min: null, priceType: null, brandId: 0, customerCategoryId: 0, status: null }
let restObj = { name: '', code: '', max: null, min: null, priceType: null, priceTypeList: null, brandId: 0, customerCategoryId: 0, status: null, statusList: null }
setFilterParams(restObj)
setBrandValue(undefined)
setClassValue(undefined)
......@@ -596,8 +598,12 @@ const Products: React.FC<{}> = () => {
}
const handleSearch = (val?: string) => {
console.log(val)
let obj = val ? {...filterParams, name: val} : { ...filterParams }
let _params: any = { ...filterParams }
if(_params.priceType)
_params.priceTypeList = [_params.priceType]
if(_params.status)
_params.statusList = [_params.status]
let obj = val ? {..._params, name: val} : { ..._params }
setFilterParams(obj)
ref.current.reload(obj)
}
......
......@@ -232,21 +232,21 @@ export const addChannelSchema: ISchema = {
},
},
properties: {
categoryId: {
customerCategoryName: {
type: 'string',
"x-component": 'SearchSelect',
// "x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请选择品类',
className: 'fixed-ant-selected-down',
fetchSearch: PublicApi.getProductSelectGetSelectCategory,
placeholder: '请输入品类',
// className: 'fixed-ant-selected-down',
// fetchSearch: PublicApi.getProductSelectGetSelectCategory,
}
},
brandId: {
brandName: {
type: 'string',
"x-component": 'SearchSelect',
// "x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请选择品牌',
fetchSearch: PublicApi.getProductSelectGetSelectBrand,
placeholder: '请输入品牌',
// fetchSearch: PublicApi.getProductSelectGetSelectBrand,
}
},
parentMemberId: {
......
......@@ -83,7 +83,7 @@ baseRequest.interceptors.request.use((url: string, options: RequestOptionsInit):
}
options.paramsSerializer = params => {
return qs.stringify(params, { arrayFormat: 'brackets' })
return qs.stringify(params, { arrayFormat: 'indices' })
}
return {
// 前缀如果已经带上api, 跳过自动补前缀
......
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