Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈智峰
jinfa-platform
Commits
aa834097
Commit
aa834097
authored
Sep 18, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:商品渠道商品字段变更
parent
cdc196fd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
23 deletions
+29
-23
basicInfoForm.tsx
...ages/commodity/products/addProductsItem/basicInfoForm.tsx
+6
-6
index.tsx
src/pages/commodity/products/index.tsx
+13
-7
channelSchema.tsx
src/pages/commodity/products/schema/channelSchema.tsx
+9
-9
request.ts
src/utils/request.ts
+1
-1
No files found.
src/pages/commodity/products/addProductsItem/basicInfoForm.tsx
View file @
aa834097
...
...
@@ -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
}
...
...
src/pages/commodity/products/index.tsx
View file @
aa834097
...
...
@@ -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
)
}
...
...
src/pages/commodity/products/schema/channelSchema.tsx
View file @
aa834097
...
...
@@ -232,21 +232,21 @@ export const addChannelSchema: ISchema = {
},
},
properties
:
{
c
ategoryId
:
{
c
ustomerCategoryName
:
{
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,
}
},
brand
Id
:
{
brand
Name
:
{
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
//
"x-component": 'SearchSelect',
"x-component-props"
:
{
placeholder
:
'请
选择
品牌'
,
fetchSearch
:
PublicApi
.
getProductSelectGetSelectBrand
,
placeholder
:
'请
输入
品牌'
,
//
fetchSearch: PublicApi.getProductSelectGetSelectBrand,
}
},
parentMemberId
:
{
...
...
src/utils/request.ts
View file @
aa834097
...
...
@@ -83,7 +83,7 @@ baseRequest.interceptors.request.use((url: string, options: RequestOptionsInit):
}
options
.
paramsSerializer
=
params
=>
{
return
qs
.
stringify
(
params
,
{
arrayFormat
:
'
bracket
s'
})
return
qs
.
stringify
(
params
,
{
arrayFormat
:
'
indice
s'
})
}
return
{
// 前缀如果已经带上api, 跳过自动补前缀
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment