Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 22dc23b9
authored
May 17, 2026
by
Jaxon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix(profitMarginTable): 修复利润率表格的初始化和数据计算逻辑
调整加载状态的包裹范围,移除重复的API请求,补充缺失的表格高度更新逻辑,优化组件初始化流程
1 parent
649aee6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
src/views/goods/shelfProduct/components/profitMarginTable/index.vue
src/views/goods/shelfProduct/components/profitMarginTable/index.vue
View file @
22dc23b
...
@@ -272,17 +272,24 @@ export default {
...
@@ -272,17 +272,24 @@ export default {
},
},
async
mounted
()
{
async
mounted
()
{
await
this
.
withLoading
(
async
()
=>
{
await
this
.
getTableData
();
await
this
.
$nextTick
();
await
this
.
setTableHeight
();
if
(
this
.
$refs
.
tableRef
)
{
this
.
$refs
.
tableRef
.
doLayout
();
}
});
if
(
this
.
useEdit
)
{
if
(
this
.
useEdit
)
{
await
this
.
getCalculateData
();
await
this
.
getCalculateData
();
}
}
await
this
.
withLoading
(
async
()
=>
{
const
{
profitRateCalFinish
}
=
await
getShelfProductUpdateStep
({
businessCode
:
this
.
businessCode
});
if
(
profitRateCalFinish
===
"Y"
)
{
await
this
.
getTableData
();
await
this
.
$nextTick
();
await
this
.
setTableHeight
();
if
(
this
.
$refs
.
tableRef
)
{
this
.
$refs
.
tableRef
.
doLayout
();
}
return
;
}
if
(
this
.
useEdit
)
{
await
this
.
getCalculateData
(
profitRateCalFinish
);
}
});
window
.
addEventListener
(
"resize"
,
this
.
setTableHeight
);
window
.
addEventListener
(
"resize"
,
this
.
setTableHeight
);
},
},
beforeDestroy
()
{
beforeDestroy
()
{
...
@@ -293,18 +300,18 @@ export default {
...
@@ -293,18 +300,18 @@ export default {
},
},
methods
:
{
methods
:
{
isZeroOrNumber
,
isZeroOrNumber
,
async
getCalculateData
()
{
async
getCalculateData
(
profitRateCalFinish
)
{
const
{
profitRateCalFinish
}
=
await
getShelfProductUpdateStep
({
businessCode
:
this
.
businessCode
});
const
that
=
this
;
const
that
=
this
;
const
requestFn
=
()
=>
{
const
requestFn
=
()
=>
{
return
getShelfProductUpdateStep
({
businessCode
:
that
.
businessCode
});
return
getShelfProductUpdateStep
({
businessCode
:
that
.
businessCode
});
};
};
async
function
stopCondition
({
profitRateCalFinish
})
{
async
function
stopCondition
({
profitRateCalFinish
})
{
console
.
log
(
"profitRateCalFinish"
,
profitRateCalFinish
);
// // 更新数据
// // 更新数据
if
(
profitRateCalFinish
===
"Y"
)
{
if
(
profitRateCalFinish
===
"Y"
)
{
await
that
.
getTableData
();
await
that
.
getTableData
();
await
that
.
$nextTick
();
await
that
.
setTableHeight
();
that
.
dialog
.
profitRateCalFinish
.
show
=
false
;
that
.
dialog
.
profitRateCalFinish
.
show
=
false
;
return
true
;
return
true
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment