Commit 29d51a8a by Jaxon

Merge branch 'feature/goods-shelf' into 'SAAS+V5.8.0'

fix(profitMarginTable): 修复利润率表格的初始化和数据计算逻辑

See merge request !636
2 parents 93220793 22dc23b9
......@@ -272,17 +272,24 @@ export default {
},
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) {
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);
},
beforeDestroy() {
......@@ -293,18 +300,18 @@ export default {
},
methods: {
isZeroOrNumber,
async getCalculateData() {
const { profitRateCalFinish } = await getShelfProductUpdateStep({ businessCode: this.businessCode });
async getCalculateData(profitRateCalFinish) {
const that = this;
const requestFn = () => {
return getShelfProductUpdateStep({ businessCode: that.businessCode });
};
async function stopCondition({ profitRateCalFinish }) {
console.log("profitRateCalFinish", profitRateCalFinish);
// // 更新数据
if (profitRateCalFinish === "Y") {
await that.getTableData();
await that.$nextTick();
await that.setTableHeight();
that.dialog.profitRateCalFinish.show = false;
return true;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!