Commit 17a8bef6 by Lin

feat(earlyWarningManager): 新增策略员工列表查询接口并优化组件逻辑

- 新增getStrategyStaffListNew方法,支持根据手机号查询策略驻店员工/区域运营/飞行督导列表。
- 修改AddStrategy组件,动态选择API接口以适应不同策略类型。
- 更新MultipleStaff组件,增加strategyType属性以支持不同的员工筛选逻辑。
1 parent d8e41885
......@@ -422,11 +422,14 @@ export function getStrategyStaffList(data = {}) {
data.method = "dj.api.strategy.staff.page";
return request(data, RequestMethods.POST);
}
// export function getStrategyStaffList(data = {}) {
// data.method = "dj.api.strategy.staff.page.distinct.phone";
// return request(data, RequestMethods.POST);
// }
/**
*
* 查询策略 驻店员工/区域运营/飞行督导列表 - 去重新接口
*/
export function getStrategyStaffListNew(data = {}) {
data.method = "dj.api.strategy.staff.page.distinct.phone";
return request(data, RequestMethods.POST);
}
/*
/**
......
......@@ -78,12 +78,19 @@
<script>
import {
getStrategyStaffList,
getStrategyStaffListNew,
} from "@api/earlyWarningManager";
import multipleMixin from "./multipleMixin";
export default {
name: "MultipleStaff",
mixins: [multipleMixin],
props: {
strategyType: {
type: [Number, String],
default: null,
},
},
data() {
return {
dialogConfig: {
......@@ -92,14 +99,25 @@ export default {
width: "1092px",
},
},
targetId: "staffUuid",
getListApi: getStrategyStaffList,
searchForm: {
staffName: "",
},
tableParams: {
};
},
computed: {
isPhoneMode() {
return this.strategyType == 0 || this.strategyType == 1;
},
targetId() {
return this.isPhoneMode ? "phoneNumber" : "staffUuid";
},
getListApi() {
return this.isPhoneMode ? getStrategyStaffListNew : getStrategyStaffList;
},
tableParams() {
return {
listName: "list",
mutiSelectUniqueKey: "staffUuid",
mutiSelectUniqueKey: this.targetId,
mutiSelectName: "contentIndex",
tableColumns: [
{
......@@ -124,8 +142,8 @@ export default {
},
},
],
},
};
};
},
},
mounted() {
},
......
......@@ -2,7 +2,7 @@ const STRATEGYTYPEOPTIONS = [
{ label: "学习", value: 0 },
{ label: "优秀案例分享", value: 1 },
{ label: "带教", value: 2 },
{ label: "任务下发", value: 3 },
{ label: "通知", value: 3 },
{ label: "销售精英到店提拉", value: 4 },
{ label: "强力促销", value: 5 },
{ label: "最终盘点与低客单产品购入", value: 6 },
......
......@@ -136,12 +136,14 @@
</div>
<MultipleStaff ref="staffTagRef"
:choose-data="formData.staffList"
:strategy-type="strategyType"
:visible="staffTagVisible"
@choose="formatMultipleList($event, 'staffList')"
@dialogClose="staffTagVisible = false">
</MultipleStaff>
<MultipleStaff ref="staffTagRef"
:choose-data="formData.staffList_1"
:strategy-type="strategyType"
:visible="staffTag1Visible"
@choose="formatMultipleList($event, 'staffList_1')"
@dialogClose="staffTag1Visible = false">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!