Commit 17a8bef6 by Lin

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

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