Commit 6ff6fe7b by Lin

feat: 新增策略中心门店分析与商品品类分析API

- 在早期预警管理API中新增getStrategyStoreDetailSummaryZJ和getStrategyGoodsSummaryWithWarnZJ函数,增强门店与商品分析能力。
- 在StaffOverview和SummaryOverview组件中引入新API,优化数据展示与交互体验。
- 更新相关方法以支持异步数据加载,提升用户体验与数据准确性。
1 parent cad43dc8
...@@ -712,3 +712,19 @@ export function getStrategyAnalysisEffect(data = {}) { ...@@ -712,3 +712,19 @@ export function getStrategyAnalysisEffect(data = {}) {
data.method = "dj.api.strategy.analysis.effect"; data.method = "dj.api.strategy.analysis.effect";
return request(data, RequestMethods.POST); return request(data, RequestMethods.POST);
} }
/**
* 策略中心-门店分析-主机厂
*/
export function getStrategyStoreDetailSummaryZJ(data = {}) {
data.method = "dj.api.strategy.merchant.analysis.store.detail.zjsummary";
return request(data, RequestMethods.POST);
}
/**
* 策略中心-门店商品品类分析-主机厂
*/
export function getStrategyGoodsSummaryWithWarnZJ(data = {}) {
data.method = "dj.api.strategy.merchant.analysis.goods.summary.withWarnZJ";
return request(data, RequestMethods.POST);
}
\ No newline at end of file \ No newline at end of file
...@@ -211,6 +211,7 @@ ...@@ -211,6 +211,7 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { import {
disableStrategyStaff, disableStrategyStaff,
getStrategyGoodsSummaryWithWarnZJ,
getStrategyMerchantAnalysisEmployeeSummary, getStrategyMerchantAnalysisEmployeeSummary,
getStrategyMerchantAnalysisGoodsSummaryWithWarn, getStrategyMerchantAnalysisGoodsSummaryWithWarn,
getStrategyStaffListAnalysis, getStrategyStaffListAnalysis,
...@@ -418,6 +419,7 @@ export default { ...@@ -418,6 +419,7 @@ export default {
this.getStrategyStaffSummaryDuration(item); this.getStrategyStaffSummaryDuration(item);
this.getStrategyMerchantAnalysisEmployeeSummary(item); this.getStrategyMerchantAnalysisEmployeeSummary(item);
this.getStrategyMerchantAnalysisGoodsSummaryWithWarn(item); this.getStrategyMerchantAnalysisGoodsSummaryWithWarn(item);
this.getStrategyGoodsSummaryWithWarnZJInfo(item);
}, },
async getStrategyMerchantAnalysisGoodsSummaryWithWarn(item) { async getStrategyMerchantAnalysisGoodsSummaryWithWarn(item) {
try { try {
...@@ -427,12 +429,28 @@ export default { ...@@ -427,12 +429,28 @@ export default {
...params, ...params,
staffUuids: [item.staffId], staffUuids: [item.staffId],
}); });
console.log(summaryGoodsData, "getStrategyMerchantAnalysisGoodsSummaryWithWarn(查询驻店员工商品概况)");
this.viewData = summaryGoodsData || {}; this.viewData = summaryGoodsData || {};
this.staffRightLoading = false; this.staffRightLoading = false;
} catch (error) { } catch (error) {
this.staffRightLoading = false; this.staffRightLoading = false;
} }
}, },
async getStrategyGoodsSummaryWithWarnZJInfo(item) {
try {
this.staffRightLoading = true;
const params = this.paramsInfo;
const summaryGoodsData = await getStrategyGoodsSummaryWithWarnZJ({
...params,
staffUuids: [item.staffId],
});
console.log(summaryGoodsData, "getStrategyGoodsSummaryWithWarnZJ");
// this.viewData = summaryGoodsData || {};
// this.staffRightLoading = false;
} catch (error) {
// this.staffRightLoading = false;
}
},
async getStrategyMerchantAnalysisEmployeeSummary(item) { async getStrategyMerchantAnalysisEmployeeSummary(item) {
try { try {
this.staffLeftLoading = true; this.staffLeftLoading = true;
......
...@@ -170,6 +170,7 @@ import { ...@@ -170,6 +170,7 @@ import {
getStrategyMerchantAnalysisGoodsSummaryWithWarn, getStrategyMerchantAnalysisGoodsSummaryWithWarn,
getStrategyMerchantAnalysisStoreDetailSummary, getStrategyMerchantAnalysisStoreDetailSummary,
getStrategyMerchantListWarningInfo, getStrategyMerchantListWarningInfo,
getStrategyStoreDetailSummaryZJ,
} from "@/api/earlyWarningManager"; } from "@/api/earlyWarningManager";
import EarlyWarningTips from "../EarlyWarningTips.vue"; import EarlyWarningTips from "../EarlyWarningTips.vue";
import OverViewList from "../OverViewList.vue"; import OverViewList from "../OverViewList.vue";
...@@ -348,6 +349,7 @@ export default { ...@@ -348,6 +349,7 @@ export default {
this.getStrategyMerchantAnalysisStoreDetailSummary(); this.getStrategyMerchantAnalysisStoreDetailSummary();
this.getStrategyMerchantAnalysisGoodsSummaryWithWarn(); this.getStrategyMerchantAnalysisGoodsSummaryWithWarn();
this.getStrategyMerchantListWarningInfo(); this.getStrategyMerchantListWarningInfo();
this.getStrategyStoreDetailSummaryZJInfo();
}, },
async getStrategyMerchantAnalysisStoreDetailSummary() { async getStrategyMerchantAnalysisStoreDetailSummary() {
try { try {
...@@ -400,6 +402,28 @@ export default { ...@@ -400,6 +402,28 @@ export default {
this.leftWarningInfoList = leftWarningInfoList; this.leftWarningInfoList = leftWarningInfoList;
this.rightWarningInfoList = rightWarningInfoList; this.rightWarningInfoList = rightWarningInfoList;
}, },
async getStrategyStoreDetailSummaryZJInfo() {
let params = this.paramsInfo;
let data = await getStrategyStoreDetailSummaryZJ(params);
console.log(data, "SummaryOverview/index.vue(查询门店经营概况-主机厂)");
// let leftWarningInfoList = [];
// let rightWarningInfoList = [];
// data.forEach((e, index) => {
// if ((index + 1) % 2 == 0) {
// rightWarningInfoList.push({
// type: e.startsWith("兜底预警") ? 1 : 2,
// text: e,
// });
// } else {
// leftWarningInfoList.push({
// type: e.startsWith("兜底预警") ? 1 : 2,
// text: e,
// });
// }
// });
// this.leftWarningInfoList = leftWarningInfoList;
// this.rightWarningInfoList = rightWarningInfoList;
},
}, },
}; };
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!