Commit fcfcd98a by Jaxon

Merge branch 'feature/strategy-center' into 'SAAS+V5.8.2'

Feature/strategy center

See merge request !690
2 parents 4661846a 74ed8f94
...@@ -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);
}
/* /*
/** /**
......
...@@ -64,7 +64,7 @@ const STRATEGY_TYPE_CONFIG = { ...@@ -64,7 +64,7 @@ const STRATEGY_TYPE_CONFIG = {
0: { name: "学习", color: "#409EFF" }, 0: { name: "学习", color: "#409EFF" },
1: { name: "优秀案例分享", color: "#36CBCB" }, 1: { name: "优秀案例分享", color: "#36CBCB" },
2: { name: "带教", color: "#67C23A" }, 2: { name: "带教", color: "#67C23A" },
3: { name: "任务下发", color: "#FFD666" }, 3: { name: "通知", color: "#FFD666" },
4: { name: "销售精英到店提拉", color: "#B3E19D" }, 4: { name: "销售精英到店提拉", color: "#B3E19D" },
5: { name: "强力促销", color: "#E6A23C" }, 5: { name: "强力促销", color: "#E6A23C" },
6: { name: "最终盘点与低客单产品购入", color: "#9254DE" }, 6: { name: "最终盘点与低客单产品购入", color: "#9254DE" },
......
...@@ -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">
......
<template> <template>
<div :class="['warning-item flex',`bg-${item.type || 1}`]"> <div class="warning-item flex" :class="[`bg-${item.type || 1}`]">
<img <img class="warning-icon"
:src="icon" :src="icon">
class="warning-icon" <div class="warning-text text-hide">
> {{ item.text }}
<div class="warning-text text-hide">{{ item.text }}</div> </div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
const type_1 = require('@/assets/strategy/icon-strategy-type01.png'), const type_1 = require("@/assets/strategy/icon-strategy-type01.png");
type_2 = require('@/assets/strategy/icon-strategy-type02.png'), const type_2 = require("@/assets/strategy/icon-strategy-type01.png");
type_3 = require('@/assets/strategy/icon-strategy-type03.png'), const type_3 = require("@/assets/strategy/icon-strategy-type02.png");
type_4 = require('@/assets/strategy/icon-strategy-type04.png'), const type_6 = require("@/assets/strategy/icon-strategy-type06.png");
type_5 = require('@/assets/strategy/icon-strategy-type05.png'), const type_4 = require("@/assets/strategy/icon-strategy-type07.png");
type_6 = require('@/assets/strategy/icon-strategy-type06.png') const type_5 = require("@/assets/strategy/icon-strategy-type08.png");
export default { export default {
name: 'EarlyWarningTips', name: "EarlyWarningTips",
props: { props: {
item: { item: {
type: Object, type: Object,
default: () => ({}) default: () => ({}),
} },
}, },
computed: { data() {
icon () { return {
return { };
1: type_1, },
2: type_2, computed: {
3: type_3, icon() {
4: type_4, return {
5: type_5, 1: type_1,
6: type_6 2: type_2,
}[this.item.type] || '' 3: type_3,
} 4: type_4,
}, 5: type_5,
data () { 6: type_6,
return { }[this.item.type] || "";
} },
}, },
mounted () { mounted() {
}, },
methods: { methods: {
} },
} };
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.flex { .flex {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.warning-item { .warning-item {
width: 100%; width: 100%;
border-radius: 4px; border-radius: 4px;
color: #333333; color: #333333;
font-size: 13px; font-size: 13px;
margin-top: 12px; margin-top: 12px;
height: 30px; height: 30px;
background: #2c66f714; background: #2c66f714;
box-sizing: border-box; box-sizing: border-box;
padding: 0 8px; padding: 0 8px;
word-break: break-all; word-break: break-all;
.warning-icon { .warning-icon {
width: 18px; width: 18px;
height: 18px; height: 18px;
margin-right: 6px; margin-right: 6px;
} }
.warning-text { .warning-text {
width: calc(100% - 24px); width: calc(100% - 24px);
} }
} }
.bg-1 { .bg-1 {
background: #f2472414; background: #f2472414;
} }
.bg-2 { .bg-2 {
background: #ff9d0a14; background: #f2472414;
}
.bg-3 {
background: #ff9d0a14;
}
.bg-4 {
background: #f2472414;
}
.bg-5 {
background: #ff9d0a14;
}
.bg-6 {
background: #2c66f714;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
import dayjs from "dayjs" import dayjs from "dayjs";
const STRATEGYTYPEOPTIONS = { const STRATEGYTYPEOPTIONS = {
0: '学习', 0: "学习",
1: '优秀案例分享', 1: "优秀案例分享",
2: '带教', 2: "带教",
3: '任务下发', 3: "通知",
4: '销售精英到店提拉', 4: "销售精英到店提拉",
5: '强力促销', 5: "强力促销",
6: '最终盘点与低客单产品购入', 6: "最终盘点与低客单产品购入",
7: '留言' 7: "留言",
} };
const DATE_RANGE = { const DATE_RANGE = {
label: '执行周期', label: "执行周期",
format: (val) => { format: (val) => {
let { let {
startDate, startDate,
endDate endDate,
} = val } = val;
return `${dayjs(startDate).format('YYYY-MM-DD')}至 ${dayjs(endDate).format('YYYY-MM-DD')}` return `${dayjs(startDate).format("YYYY-MM-DD")}至 ${dayjs(endDate).format("YYYY-MM-DD")}`;
} },
} };
const TITLE = { const TITLE = {
label: '标题', label: "标题",
key: 'title', key: "title",
} };
const CREATED = { const CREATED = {
label: '操作人', label: "操作人",
key: 'createdBy', key: "createdBy",
} };
const CREATED_DATE = { const CREATED_DATE = {
label: '操作时间', label: "操作时间",
format: (val) => { format: (val) => {
return dayjs(val.createdDate).format('YYYY-MM-DD HH:mm:ss') return dayjs(val.createdDate).format("YYYY-MM-DD HH:mm:ss");
} },
} };
const STRATEGY_FORM_01 = [ const STRATEGY_FORM_01 = [
TITLE, TITLE,
DATE_RANGE, DATE_RANGE,
CREATED, CREATED,
CREATED_DATE CREATED_DATE,
] ];
const STRATEGY_FORM_2456 = [ const STRATEGY_FORM_2456 = [
CREATED, CREATED,
DATE_RANGE, DATE_RANGE,
{ {
label: '执行人', label: "执行人",
format: (val) => { format: (val) => {
let { let {
executePersons executePersons,
} = val } = val;
return executePersons?.map(item => item.username).join('/') return executePersons?.map(item => item.username).join("/");
}, },
hide: (val) => { hide: (val) => {
let { let {
strategyType strategyType,
} = val } = val;
return [5, 6].includes(strategyType) return [5, 6].includes(strategyType);
} },
}, },
CREATED_DATE CREATED_DATE,
] ];
const STRATEGY_FORM_3 = [ const STRATEGY_FORM_3 = [
CREATED, CREATED,
TITLE, TITLE,
CREATED_DATE, CREATED_DATE,
{ {
label: '副标题', label: "副标题",
key: 'subTitle', key: "subTitle",
class: 'bespread', class: "bespread",
}, },
{ {
label: '执行时间', label: "执行时间",
key: 'startDate', key: "startDate",
}, },
] ];
const STRATEGY_FORM_7 = [ const STRATEGY_FORM_7 = [
CREATED, CREATED,
CREATED_DATE, CREATED_DATE,
{ {
label: '处理人', label: "处理人",
format: (val) => { format: (val) => {
let { let {
executePersons executePersons,
} = val } = val;
return executePersons?.map(item => item.username).join('/') || '-' return executePersons?.map(item => item.username).join("/") || "-";
}, },
}, },
] ];
export { export {
STRATEGYTYPEOPTIONS,
STRATEGY_FORM_01, STRATEGY_FORM_01,
STRATEGY_FORM_2456,
STRATEGY_FORM_3, STRATEGY_FORM_3,
STRATEGY_FORM_7 STRATEGY_FORM_7,
} STRATEGY_FORM_2456,
STRATEGYTYPEOPTIONS,
};
...@@ -12,7 +12,7 @@ const STRATEGYTYPEOPTIONS = { ...@@ -12,7 +12,7 @@ const STRATEGYTYPEOPTIONS = {
0: "学习", 0: "学习",
1: "优秀案例分享", 1: "优秀案例分享",
2: "带教", 2: "带教",
3: "任务下发", 3: "通知",
4: "销售精英到店提拉", 4: "销售精英到店提拉",
5: "强力促销", 5: "强力促销",
6: "最终盘点与低客单产品购入", 6: "最终盘点与低客单产品购入",
......
...@@ -601,7 +601,7 @@ export default { ...@@ -601,7 +601,7 @@ export default {
height: calc(100% - 91px); height: calc(100% - 91px);
margin-top: 8px; margin-top: 8px;
box-sizing: border-box; box-sizing: border-box;
padding: 12px 20px 12px 13px; padding: 12px 22px 12px 26px;
z-index: 9; z-index: 9;
.help { .help {
position: absolute; position: absolute;
...@@ -683,6 +683,7 @@ export default { ...@@ -683,6 +683,7 @@ export default {
height: 100%; height: 100%;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
.label { .label {
color: #666666; color: #666666;
font-size: 13px; font-size: 13px;
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
操作日志 操作日志
</div> </div>
<el-table v-loading="loading" <el-table v-loading="loading"
style="width: 100%"
border border
:data="tableData" :data="tableData">
style="width: 100%">
<el-table-column align="center" <el-table-column align="center"
label="序号" label="序号"
type="index" type="index"
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
pageSize: 1000, pageSize: 1000,
currentPage: 1, currentPage: 1,
upgradeGoodsId: this.row.upgradeGoodsId, upgradeGoodsId: this.row.upgradeGoodsId,
merchantId: this.row.merchantId, merchantId: this.row.yqMerchantId,
}; };
getReplenishLogListApi(params).then((res) => { getReplenishLogListApi(params).then((res) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!