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