Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
9a688b97
Commit
9a688b97
authored
Jan 04, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改缓存回显报错问题
parent
d82815ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
EditFormTable.jsx
src/pages/ServiceGoods/components/EditFormTable.jsx
+0
-1
FormPriceOrStock.jsx
src/pages/ServiceGoods/components/FormPriceOrStock.jsx
+7
-8
No files found.
src/pages/ServiceGoods/components/EditFormTable.jsx
View file @
9a688b97
...
@@ -173,7 +173,6 @@ const EditFormTable = forwardRef((props, ref) => {
...
@@ -173,7 +173,6 @@ const EditFormTable = forwardRef((props, ref) => {
return
rowProps
;
return
rowProps
;
},
},
}));
}));
// console.log('columns :>> ', columns);
return
(
return
(
<>
<>
...
...
src/pages/ServiceGoods/components/FormPriceOrStock.jsx
View file @
9a688b97
...
@@ -177,7 +177,7 @@ const SpecificationTemplate = (props, _) => {
...
@@ -177,7 +177,7 @@ const SpecificationTemplate = (props, _) => {
);
);
};
};
const
CreateBatchFormItems
=
({
specInitValue
,
batchChange
,
editRef
,
defaultColumns
})
=>
{
const
CreateBatchFormItems
=
({
specInitValue
,
batchChange
,
defaultColumns
})
=>
{
const
customer
=
useContext
(
ServiceContext
);
const
customer
=
useContext
(
ServiceContext
);
const
formItems
=
defaultColumns
const
formItems
=
defaultColumns
.
filter
(
item
=>
item
.
batchRole
&&
item
?.
batchRole
.
includes
(
customer
.
productType
))
.
filter
(
item
=>
item
.
batchRole
&&
item
?.
batchRole
.
includes
(
customer
.
productType
))
...
@@ -200,7 +200,7 @@ const CreateBatchFormItems = ({ specInitValue, batchChange, editRef, defaultColu
...
@@ -200,7 +200,7 @@ const CreateBatchFormItems = ({ specInitValue, batchChange, editRef, defaultColu
noSty
noSty
formName=
"bacthFirst"
formName=
"bacthFirst"
placeholder=
{
specInitValue
.
firstSpec
}
placeholder=
{
specInitValue
.
firstSpec
}
dataList=
{
specInitValue
.
firstSpecValue
}
dataList=
{
specInitValue
.
firstSpecValue
||
[]
}
fieldNames=
{
{
label
:
'
firstSpecValue
'
,
value
:
'
firstSpecValue
'
}
}
fieldNames=
{
{
label
:
'
firstSpecValue
'
,
value
:
'
firstSpecValue
'
}
}
/>
/>
<
SelectTemplate
<
SelectTemplate
...
@@ -208,7 +208,7 @@ const CreateBatchFormItems = ({ specInitValue, batchChange, editRef, defaultColu
...
@@ -208,7 +208,7 @@ const CreateBatchFormItems = ({ specInitValue, batchChange, editRef, defaultColu
width=
{
150
}
width=
{
150
}
formName=
"bacthSecon"
formName=
"bacthSecon"
placeholder=
{
specInitValue
.
secondSpec
}
placeholder=
{
specInitValue
.
secondSpec
}
dataList=
{
specInitValue
.
secondSpecValue
}
dataList=
{
specInitValue
.
secondSpecValue
||
[]
}
fieldNames=
{
{
label
:
'
secondSpecValue
'
,
value
:
'
secondSpecValue
'
}
}
fieldNames=
{
{
label
:
'
secondSpecValue
'
,
value
:
'
secondSpecValue
'
}
}
/>
/>
{
formItems
.
concat
(
{
formItems
.
concat
(
...
@@ -301,7 +301,7 @@ const FormPriceOrStock = forwardRef((props, ref) => {
...
@@ -301,7 +301,7 @@ const FormPriceOrStock = forwardRef((props, ref) => {
const
CreateColumnsEvent
=
specData
=>
{
const
CreateColumnsEvent
=
specData
=>
{
const
columsData
=
[];
const
columsData
=
[];
if
(
specData
.
firstSpec
&&
specData
.
firstSpecValue
.
length
)
{
if
(
specData
.
firstSpec
&&
specData
.
firstSpecValue
&&
specData
.
firstSpecValue
.
length
)
{
columsData
.
push
({
columsData
.
push
({
title
:
specData
.
firstSpec
,
title
:
specData
.
firstSpec
,
dataIndex
:
'
firstSpecValue
'
,
dataIndex
:
'
firstSpecValue
'
,
...
@@ -309,7 +309,7 @@ const FormPriceOrStock = forwardRef((props, ref) => {
...
@@ -309,7 +309,7 @@ const FormPriceOrStock = forwardRef((props, ref) => {
});
});
}
}
if
(
specData
.
secondSpec
&&
specData
.
secondSpecValue
.
length
)
{
if
(
specData
.
secondSpec
&&
specData
.
secondSpecValue
&&
specData
.
secondSpecValue
.
length
)
{
columsData
.
push
({
columsData
.
push
({
title
:
specData
.
secondSpec
,
title
:
specData
.
secondSpec
,
dataIndex
:
'
secondSpecValue
'
,
dataIndex
:
'
secondSpecValue
'
,
...
@@ -338,7 +338,6 @@ const FormPriceOrStock = forwardRef((props, ref) => {
...
@@ -338,7 +338,6 @@ const FormPriceOrStock = forwardRef((props, ref) => {
const
{
inIdList
:
secndInIdList
,
noIdList
:
secndNoIdList
}
=
filterSkuNotIdList
(
const
{
inIdList
:
secndInIdList
,
noIdList
:
secndNoIdList
}
=
filterSkuNotIdList
(
cleanValues
.
secondValues
,
cleanValues
.
secondValues
,
);
);
console
.
log
(
'
skuList :>>
'
,
skuList
);
const
createSkuList
=
createProductData
(
const
createSkuList
=
createProductData
(
{
{
firstSpecId
:
cleanValues
.
firstSpecId
,
firstSpecId
:
cleanValues
.
firstSpecId
,
...
@@ -449,8 +448,8 @@ const FormPriceOrStock = forwardRef((props, ref) => {
...
@@ -449,8 +448,8 @@ const FormPriceOrStock = forwardRef((props, ref) => {
firstOnChangeEvent
();
// 触发成底部动态表格数据
firstOnChangeEvent
();
// 触发成底部动态表格数据
setSpecInitValue
(
editData
);
// 缓存规格数据
setSpecInitValue
(
editData
);
// 缓存规格数据
CreateColumnsEvent
(
editData
);
CreateColumnsEvent
(
editData
);
setMergeTable
(
Boolean
(
editData
.
secondSpecValue
.
length
));
setMergeTable
(
Boolean
(
editData
.
secondSpecValue
&&
editData
.
secondSpecValue
.
length
));
setTableData
(
fliterSkuListSortData
(
skuList
));
setTableData
(
fliterSkuListSortData
(
skuList
)
||
[]
);
}
}
},
[
customer
.
isEdit
,
customer
.
isUseCache
,
editData
]);
},
[
customer
.
isEdit
,
customer
.
isUseCache
,
editData
]);
...
...
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