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
shenshaokai
jinfa-platform
Commits
301e07c5
Commit
301e07c5
authored
Apr 01, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理品类发货周期字段精度超出的问题,商品编辑兼容商品草稿数据中品牌的回显
parent
15d0e50e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
4 deletions
+16
-4
index.ts
src/pages/classAndProperty/class/schema/index.ts
+1
-1
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+3
-0
basicInfoForm.tsx
...ages/commodity/products/addProductsItem/basicInfoForm.tsx
+3
-1
index.tsx
src/pages/commodity/products/constant/index.tsx
+2
-1
index.ts
src/store/product/index.ts
+7
-1
No files found.
src/pages/classAndProperty/class/schema/index.ts
View file @
301e07c5
...
...
@@ -105,7 +105,7 @@ export const classSchema: ISchema = {
},
'x-rules'
:
[
{
pattern
:
/^
([
1-9
]\d
*
|
[
0
]{1,1})
$/
,
pattern
:
/^
([
1-9
]\d
{0,8}
|
[
0
]{1,1})
$/
,
message
:
getIntl
().
formatMessage
({
id
:
'classAndProperty.class.classSchema.deadline.placeholder1'
}),
}
]
...
...
src/pages/commodity/products/addProducts.tsx
View file @
301e07c5
...
...
@@ -48,6 +48,7 @@ const AddProducts: React.FC<{}> = (props) => {
productAttributeAndImageParams
,
areaOption
,
productDescription
,
brandName
,
setProductName
,
setAttributeLists
,
clearData
,
...
...
@@ -354,6 +355,7 @@ const AddProducts: React.FC<{}> = (props) => {
numberKeys
.
map
(
item
=>
delete
_params
[
item
])
}
console
.
log
(
_params
,
'params'
)
_params
.
sendCycle
=
_params
.
logistics
.
sendCycle
postProductCommoditySaveOrUpdateCommodity
(
_params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setIsEnableCheck
(
false
)
...
...
@@ -427,6 +429,7 @@ const AddProducts: React.FC<{}> = (props) => {
let
_params
=
{
...
_bacsicForm
,
brandName
,
commodityAttributeList
:
productSelectAttribute
,
commodityRemark
:
_productDescription
,
isAllAttributePic
:
isAllAttributePic
,
...
...
src/pages/commodity/products/addProductsItem/basicInfoForm.tsx
View file @
301e07c5
...
...
@@ -64,6 +64,7 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
getBasicFormParamsByEdit
,
setAttributeLists
,
setProductName
,
setBrandName
,
setSelectCategoryId
,
setSelectBrandId
,
setSendCycle
,
...
...
@@ -131,9 +132,10 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
})
}
const
handleBrandChange
=
(
value
)
=>
{
const
handleBrandChange
=
(
value
,
options
)
=>
{
setBrandValue
(
value
)
setSelectBrandId
(
value
)
setBrandName
(
options
[
'children'
])
}
const
tagRender
=
(
props
)
=>
{
...
...
src/pages/commodity/products/constant/index.tsx
View file @
301e07c5
...
...
@@ -359,7 +359,8 @@ export const filterUsefulDraftData = (data) => {
console
.
log
(
data
,
'data'
)
return
{
name
:
data
.
name
,
brandId
:
data
.
brandId
,
// brandId: data.brandId,
brand
:
{
id
:
data
.
brandId
,
name
:
data
.
brandName
},
customerCategoryId
:
data
.
customerCategoryId
,
slogan
:
data
.
slogan
,
sellingPoint
:
data
.
sellingPoint
||
[],
...
...
src/store/product/index.ts
View file @
301e07c5
...
...
@@ -16,6 +16,7 @@ export interface IDecsParams {
class
ProductStore
implements
IProductModule
{
@
observable
public
attributeLists
:
any
[]
=
[];
@
observable
public
productName
:
string
=
""
;
@
observable
public
brandName
:
string
=
""
;
@
observable
public
selectCategoryId
:
any
=
null
;
@
observable
public
selectBrandId
:
any
=
null
;
@
observable
public
productSelectAttribute
:
IProductSelectAttribute
[]
=
[];
...
...
@@ -39,7 +40,7 @@ class ProductStore implements IProductModule {
@
computed
public
get
getBasicFormParamsByEdit
():
IBasicFormParam
{
return
{
brandId
:
this
.
productInfoByEdit
?.
brand
I
d
,
brandId
:
this
.
productInfoByEdit
?.
brand
?.
i
d
,
brandName
:
this
.
productInfoByEdit
?.
brand
?.
name
,
name
:
this
.
productInfoByEdit
?.
name
,
slogan
:
this
.
productInfoByEdit
?.
slogan
,
...
...
@@ -122,6 +123,11 @@ class ProductStore implements IProductModule {
}
@
action
.
bound
public
setBrandName
(
name
:
string
)
{
this
.
brandName
=
name
;
}
@
action
.
bound
public
setSelectCategoryId
(
data
:
any
)
{
this
.
selectCategoryId
=
data
}
...
...
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