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
linweijiong
jinfa-platform
Commits
aa834097
Commit
aa834097
authored
Sep 18, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:商品渠道商品字段变更
parent
cdc196fd
Show 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) => {
...
@@ -229,12 +229,12 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
<
Form
.
Item
<
Form
.
Item
name=
"brandId"
name=
"brandId"
label=
"商品品牌"
label=
"商品品牌"
rules=
{
[
//
rules={[
{
//
{
required
:
true
,
//
required: true,
message
:
'请选择商品品牌'
//
message: '请选择商品品牌'
}
//
}
]
}
//
]}
>
>
<
Select
<
Select
disabled=
{
!
isUpdateAttribute
}
disabled=
{
!
isUpdateAttribute
}
...
...
src/pages/commodity/products/index.tsx
View file @
aa834097
...
@@ -38,12 +38,14 @@ interface Item {
...
@@ -38,12 +38,14 @@ interface Item {
interface
paramItem
{
interface
paramItem
{
name
:
string
;
name
:
string
;
code
:
string
;
code
:
string
;
priceType
:
number
;
priceType
?:
number
;
priceTypeList
:
number
[];
min
:
number
;
min
:
number
;
max
:
number
;
max
:
number
;
brandId
:
number
;
brandId
:
number
;
customerCategoryId
:
number
;
customerCategoryId
:
number
;
status
:
number
;
status
?:
number
;
statusList
:
number
[];
}
}
let
timeChange
:
any
;
let
timeChange
:
any
;
...
@@ -69,11 +71,13 @@ const Products: React.FC<{}> = () => {
...
@@ -69,11 +71,13 @@ const Products: React.FC<{}> = () => {
name
:
''
,
name
:
''
,
code
:
''
,
code
:
''
,
priceType
:
null
,
priceType
:
null
,
priceTypeList
:
null
,
min
:
null
,
min
:
null
,
max
:
null
,
max
:
null
,
brandId
:
0
,
brandId
:
0
,
customerCategoryId
:
0
,
customerCategoryId
:
0
,
status
:
null
,
status
:
null
,
statusList
:
null
,
})
})
const
[
brandData
,
setBrandData
]
=
useState
<
any
>
([])
const
[
brandData
,
setBrandData
]
=
useState
<
any
>
([])
const
[
brandValue
,
setBrandValue
]
=
useState
(
undefined
)
const
[
brandValue
,
setBrandValue
]
=
useState
(
undefined
)
...
@@ -245,7 +249,6 @@ const Products: React.FC<{}> = () => {
...
@@ -245,7 +249,6 @@ const Products: React.FC<{}> = () => {
}
}
const
fetchData
=
(
params
:
any
)
=>
{
const
fetchData
=
(
params
:
any
)
=>
{
console
.
log
(
params
,
filterParams
)
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getProductCommodityGetCommodityList
({
...
filterParams
,
...
params
}).
then
(
res
=>
{
PublicApi
.
getProductCommodityGetCommodityList
({
...
filterParams
,
...
params
}).
then
(
res
=>
{
console
.
log
(
res
,
'res'
)
console
.
log
(
res
,
'res'
)
...
@@ -256,7 +259,6 @@ const Products: React.FC<{}> = () => {
...
@@ -256,7 +259,6 @@ const Products: React.FC<{}> = () => {
}
}
const
handleSee
=
(
record
:
any
)
=>
{
const
handleSee
=
(
record
:
any
)
=>
{
console
.
log
(
'see'
)
history
.
push
(
`/memberCenter/commodityAbility/commodity/products/viewProducts?id=
${
record
.
id
}
`
)
history
.
push
(
`/memberCenter/commodityAbility/commodity/products/viewProducts?id=
${
record
.
id
}
`
)
}
}
...
@@ -562,7 +564,7 @@ const Products: React.FC<{}> = () => {
...
@@ -562,7 +564,7 @@ const Products: React.FC<{}> = () => {
}
}
const
handleReset
=
()
=>
{
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
)
setFilterParams
(
restObj
)
setBrandValue
(
undefined
)
setBrandValue
(
undefined
)
setClassValue
(
undefined
)
setClassValue
(
undefined
)
...
@@ -596,8 +598,12 @@ const Products: React.FC<{}> = () => {
...
@@ -596,8 +598,12 @@ const Products: React.FC<{}> = () => {
}
}
const
handleSearch
=
(
val
?:
string
)
=>
{
const
handleSearch
=
(
val
?:
string
)
=>
{
console
.
log
(
val
)
let
_params
:
any
=
{
...
filterParams
}
let
obj
=
val
?
{...
filterParams
,
name
:
val
}
:
{
...
filterParams
}
if
(
_params
.
priceType
)
_params
.
priceTypeList
=
[
_params
.
priceType
]
if
(
_params
.
status
)
_params
.
statusList
=
[
_params
.
status
]
let
obj
=
val
?
{...
_params
,
name
:
val
}
:
{
...
_params
}
setFilterParams
(
obj
)
setFilterParams
(
obj
)
ref
.
current
.
reload
(
obj
)
ref
.
current
.
reload
(
obj
)
}
}
...
...
src/pages/commodity/products/schema/channelSchema.tsx
View file @
aa834097
...
@@ -232,21 +232,21 @@ export const addChannelSchema: ISchema = {
...
@@ -232,21 +232,21 @@ export const addChannelSchema: ISchema = {
},
},
},
},
properties
:
{
properties
:
{
c
ategoryId
:
{
c
ustomerCategoryName
:
{
type
:
'string'
,
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
//
"x-component": 'SearchSelect',
"x-component-props"
:
{
"x-component-props"
:
{
placeholder
:
'请
选择
品类'
,
placeholder
:
'请
输入
品类'
,
className
:
'fixed-ant-selected-down'
,
//
className: 'fixed-ant-selected-down',
fetchSearch
:
PublicApi
.
getProductSelectGetSelectCategory
,
//
fetchSearch: PublicApi.getProductSelectGetSelectCategory,
}
}
},
},
brand
Id
:
{
brand
Name
:
{
type
:
'string'
,
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
//
"x-component": 'SearchSelect',
"x-component-props"
:
{
"x-component-props"
:
{
placeholder
:
'请
选择
品牌'
,
placeholder
:
'请
输入
品牌'
,
fetchSearch
:
PublicApi
.
getProductSelectGetSelectBrand
,
//
fetchSearch: PublicApi.getProductSelectGetSelectBrand,
}
}
},
},
parentMemberId
:
{
parentMemberId
:
{
...
...
src/utils/request.ts
View file @
aa834097
...
@@ -83,7 +83,7 @@ baseRequest.interceptors.request.use((url: string, options: RequestOptionsInit):
...
@@ -83,7 +83,7 @@ baseRequest.interceptors.request.use((url: string, options: RequestOptionsInit):
}
}
options
.
paramsSerializer
=
params
=>
{
options
.
paramsSerializer
=
params
=>
{
return
qs
.
stringify
(
params
,
{
arrayFormat
:
'
bracket
s'
})
return
qs
.
stringify
(
params
,
{
arrayFormat
:
'
indice
s'
})
}
}
return
{
return
{
// 前缀如果已经带上api, 跳过自动补前缀
// 前缀如果已经带上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