Commit d07a9803 by 陈羽

update: 门店视图与计划试图列表

parent 54fdde7f
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
dateToTime(val) { dateToTime(val) {
console.log(val) // console.log(val)
// (0-9)年月数字的显示 // (0-9)年月数字的显示
function formatDig(num) { function formatDig(num) {
return num > 9 ? '' + num : '0' + num; return num > 9 ? '' + num : '0' + num;
......
...@@ -387,7 +387,7 @@ export default { ...@@ -387,7 +387,7 @@ export default {
}); });
}, },
handleSelectedList(data) { handleSelectedList(data) {
console.log(data); // console.log(data);
const that = this; const that = this;
that.defaultStoreList = data || []; that.defaultStoreList = data || [];
that.saveGorupRange(); that.saveGorupRange();
...@@ -432,7 +432,7 @@ export default { ...@@ -432,7 +432,7 @@ export default {
*/ */
toChangeTemp(e, index, row) { toChangeTemp(e, index, row) {
const that = this; const that = this;
console.log(e, index, row) // console.log(e, index, row)
let para = { let para = {
brandId: that.brandId, brandId: that.brandId,
memberTagGroupId: row.memberTagGroupId, memberTagGroupId: row.memberTagGroupId,
......
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
if (status === 'complete' && result.info === 'OK') { if (status === 'complete' && result.info === 'OK') {
if (result && result.regeocode) { if (result && result.regeocode) {
/* eslint-disable */ /* eslint-disable */
console.log(result); // console.log(result);
that.address = result.regeocode.formattedAddress; that.address = result.regeocode.formattedAddress;
that.ruleForm.address = result.regeocode.formattedAddress; that.ruleForm.address = result.regeocode.formattedAddress;
that.$nextTick(); that.$nextTick();
......
...@@ -201,7 +201,7 @@ export default { ...@@ -201,7 +201,7 @@ export default {
*/ */
handleSelectedList(group) { handleSelectedList(group) {
const that = this; const that = this;
console.log(group); // console.log(group);
/* if (that.selectType === 'people') { /* if (that.selectType === 'people') {
that.formData.peopleList = group; that.formData.peopleList = group;
} else */ } else */
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
选择门店分组组件: 选择门店分组组件:
<gic-select-group <gic-select-group
:selectData="selectData" :selectData="selectData"
:checkedList="checkedList"
@checkGroupIds="checkGroupIds"> @checkGroupIds="checkGroupIds">
</gic-select-group> </gic-select-group>
...@@ -71,6 +70,7 @@ export default { ...@@ -71,6 +70,7 @@ export default {
} }
}, },
selectData: { selectData: {
// 数据回显
type: [Object, Array], type: [Object, Array],
default() { default() {
return []; return [];
...@@ -81,12 +81,6 @@ export default { ...@@ -81,12 +81,6 @@ export default {
default() { default() {
return ''; return '';
} }
},
checkedList: {
type: [Object, Array],
default() {
return [];
}
} }
}, },
data() { data() {
...@@ -103,7 +97,7 @@ export default { ...@@ -103,7 +97,7 @@ export default {
children: 'children', children: 'children',
label: 'storeGroupName' label: 'storeGroupName'
}, },
checkedKeys: this.checkedList.length ? this.checkedList.map(ele => ele.relationId) : [] checkedKeys: this.selectData.length ? this.selectData.map(ele => ele.relationId) : []
}; };
}, },
...@@ -202,7 +196,6 @@ export default { ...@@ -202,7 +196,6 @@ export default {
} }
return father.parentRelationId == 0; //返回第一层 return father.parentRelationId == 0; //返回第一层
}); });
console.log(tree);
return tree; return tree;
}, },
...@@ -227,8 +220,8 @@ export default { ...@@ -227,8 +220,8 @@ export default {
that.$nextTick(() => { that.$nextTick(() => {
that.groupData = JSON.parse(JSON.stringify(data)) || []; that.groupData = JSON.parse(JSON.stringify(data)) || [];
that.groupDataCopy = JSON.parse(JSON.stringify(that.groupData)) || []; that.groupDataCopy = JSON.parse(JSON.stringify(that.groupData)) || [];
if (that.checkedList) { if (that.selectData) {
that.checkedListCopy = that.checkedList; that.checkedListCopy = that.selectData;
} }
}); });
that.$forceUpdate(); that.$forceUpdate();
...@@ -250,16 +243,11 @@ export default { ...@@ -250,16 +243,11 @@ export default {
let that = this; let that = this;
if (!!newData.length) { if (!!newData.length) {
that.groupIds = newData; that.groupIds = newData;
that.checkedKeys = that.newData.map(ele => ele.relationId);
} else { } else {
that.groupIds = []; that.groupIds = [];
} }
}, },
checkedList: function(newData, oldData) {
let that = this;
if (!!newData.length) {
that.checkedKeys = that.checkedList.map(ele => ele.relationId);
}
},
searchSelect(val) { searchSelect(val) {
this.$refs.groupTree.filter(val); this.$refs.groupTree.filter(val);
}, },
......
...@@ -218,7 +218,7 @@ export default { ...@@ -218,7 +218,7 @@ export default {
} }
/* eslint-disable */ /* eslint-disable */
that.fileDatas = fileList; that.fileDatas = fileList;
console.log('fileList:', fileList, that.fileDatas) // console.log('fileList:', fileList, that.fileDatas)
that.$nextTick(() => { that.$nextTick(() => {
let list = []; let list = [];
if (fileList.length) { if (fileList.length) {
...@@ -300,17 +300,17 @@ export default { ...@@ -300,17 +300,17 @@ export default {
width: 104px; width: 104px;
background-color: transparent; background-color: transparent;
} }
.gic-upload__img { .gic-upload__img {
display: inline-block; display: inline-block;
} }
.gic-upload__img__drag { .gic-upload__img__drag {
max-width: 680px; max-width: 680px;
display: inline-block; display: inline-block;
font-size: 0; font-size: 0;
} }
.gic-upload__img .img-content { .gic-upload__img .img-content {
position: relative; position: relative;
display: inline-block; display: inline-block;
...@@ -323,11 +323,11 @@ export default { ...@@ -323,11 +323,11 @@ export default {
border-radius: 4px; border-radius: 4px;
cursor: pointer; cursor: pointer;
} }
.img-content.m-t-8 { .img-content.m-t-8 {
margin-top: 8px; margin-top: 8px;
} }
.gic-upload__img .img-content .upload-icon__btn { .gic-upload__img .img-content .upload-icon__btn {
position: absolute; position: absolute;
font-size: 16px; font-size: 16px;
...@@ -336,7 +336,7 @@ export default { ...@@ -336,7 +336,7 @@ export default {
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.gic-upload__img .img-content .item-img { .gic-upload__img .img-content .item-img {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -350,14 +350,14 @@ export default { ...@@ -350,14 +350,14 @@ export default {
/*border: 1px solid #dcdfe6;*/ /*border: 1px solid #dcdfe6;*/
border-radius: 0; border-radius: 0;
} }
.gic-upload__img .img-content .item-img img { .gic-upload__img .img-content .item-img img {
position: static; position: static;
display: block; display: block;
max-width: 86px; max-width: 86px;
max-height: 86px; max-height: 86px;
} }
.gic-upload__img .img-content::after { .gic-upload__img .img-content::after {
position: absolute; position: absolute;
top: 8px; top: 8px;
...@@ -371,47 +371,47 @@ export default { ...@@ -371,47 +371,47 @@ export default {
transition: all 0.3s; transition: all 0.3s;
opacity: 0; opacity: 0;
} }
.gic-upload__img .img-content:hover::after { .gic-upload__img .img-content:hover::after {
opacity: 1; opacity: 1;
} }
.gic-upload__img .img-content:hover .upload-icon__btn { .gic-upload__img .img-content:hover .upload-icon__btn {
display: block; display: block;
z-index: 100; z-index: 100;
color: #fff; color: #fff;
} }
.gic-upload__img .img-upload { .gic-upload__img .img-upload {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
font-size: 28px; font-size: 28px;
} }
.img-upload.m-t-8 { .img-upload.m-t-8 {
margin-top: 8px; margin-top: 8px;
} }
.el-upload-list--picture-card { .el-upload-list--picture-card {
display: none; display: none;
} }
.el-upload--picture-card { .el-upload--picture-card {
width: 104px; width: 104px;
height: 104px; height: 104px;
line-height: 104px; line-height: 104px;
} }
.slide-fade-enter-active { .slide-fade-enter-active {
transition: all 0.6s ease; transition: all 0.6s ease;
} }
.slide-fade-leave-active { .slide-fade-leave-active {
transition: all 0.6s cubic-bezier(0.55, 0, 0.1, 1); transition: all 0.6s cubic-bezier(0.55, 0, 0.1, 1);
} }
.slide-fade-enter, .slide-fade-enter,
.slide-fade-leave-to { .slide-fade-leave-to {
opacity: 0; opacity: 0;
} }
</style> </style>
\ No newline at end of file
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
/* eslint-disable */ /* eslint-disable */
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const that = this; const that = this;
console.log(file); // console.log(file);
that.fileType = file.type === 'image/jpeg' ? 'jpeg' : file.type === 'image/jpg' ? 'jpg' : file.type === 'image/png' ? 'png' : file.type == 'video/mp4' ? 'mp4' : ''; that.fileType = file.type === 'image/jpeg' ? 'jpeg' : file.type === 'image/jpg' ? 'jpg' : file.type === 'image/png' ? 'png' : file.type == 'video/mp4' ? 'mp4' : '';
const isJPG = file.type === 'image/jpeg' || file.type === 'image/jpg' || file.type === 'image/png'; const isJPG = file.type === 'image/jpeg' || file.type === 'image/jpg' || file.type === 'image/png';
const isMP4 = file.type == 'video/mp4'; const isMP4 = file.type == 'video/mp4';
......
...@@ -314,7 +314,7 @@ export function scrollTo(element, to, duration) { ...@@ -314,7 +314,7 @@ export function scrollTo(element, to, duration) {
const difference = to - element.scrollTop; const difference = to - element.scrollTop;
const perTick = (difference / duration) * 10; const perTick = (difference / duration) * 10;
setTimeout(() => { setTimeout(() => {
console.log(new Date()); // console.log(new Date());
element.scrollTop = element.scrollTop + perTick; element.scrollTop = element.scrollTop + perTick;
if (element.scrollTop === to) return; if (element.scrollTop === to) return;
scrollTo(element, to, duration - 10); scrollTo(element, to, duration - 10);
......
...@@ -93,14 +93,14 @@ function s2ab(s) { ...@@ -93,14 +93,14 @@ function s2ab(s) {
export function export_table_to_excel(id) { export function export_table_to_excel(id) {
var theTable = document.getElementById(id); var theTable = document.getElementById(id);
console.log('a') // console.log('a')
var oo = generateArray(theTable); var oo = generateArray(theTable);
var ranges = oo[1]; var ranges = oo[1];
/* original data */ /* original data */
var data = oo[0]; var data = oo[0];
var ws_name = "SheetJS"; var ws_name = "SheetJS";
console.log(data); // console.log(data);
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data); var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
...@@ -118,7 +118,7 @@ export function export_table_to_excel(id) { ...@@ -118,7 +118,7 @@ export function export_table_to_excel(id) {
} }
function formatJson(jsonData) { function formatJson(jsonData) {
console.log(jsonData) // console.log(jsonData)
} }
export function export_json_to_excel(th, jsonData, defaultTitle) { export function export_json_to_excel(th, jsonData, defaultTitle) {
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<el-tooltip slot="label" class="item" effect="dark" :open-delay="200" placement="top-start" content="拥有选中的门店管理权限,以及导购账号绑定权限"> <el-tooltip slot="label" class="item" effect="dark" :open-delay="200" placement="top-start" content="拥有选中的门店管理权限,以及导购账号绑定权限">
<span style="cursor: pointer;padding-bottom: 2px; border-bottom: 1px dashed #2F54EB;" class="font-14 color-606266">门店绑定</span> <span style="cursor: pointer;padding-bottom: 2px; border-bottom: 1px dashed #2F54EB;" class="font-14 color-606266">门店绑定</span>
</el-tooltip> </el-tooltip>
<gic-select-group-auth :brandId="enterpriseId" width="287px" :authMerchant="true" :selectData="partForm.storeGroup" :checkedList="checkedList" @checkGroupIds="checkGroupIds"> </gic-select-group-auth> <gic-select-group-auth :brandId="enterpriseId" width="287px" :authMerchant="true" :selectData="partForm.storeGroup" @checkGroupIds="checkGroupIds"> </gic-select-group-auth>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-tooltip slot="label" class="item" effect="dark" :open-delay="200" placement="top-start"> <el-tooltip slot="label" class="item" effect="dark" :open-delay="200" placement="top-start">
...@@ -293,7 +293,7 @@ export default { ...@@ -293,7 +293,7 @@ export default {
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
let checkedList = []; let checkedList = [];
resData.result.relations && resData.result.relations.map(item => checkedList.push({ relationId: item.relationId })); resData.result.relations && resData.result.relations.map(item => checkedList.push({ relationId: item.relationId }));
that.checkedList = checkedList; that.partForm.storeGroup = checkedList;
that.partForm.wxEnterpriseRelatedId = resData.result.wxEnterpriseRelatedId; that.partForm.wxEnterpriseRelatedId = resData.result.wxEnterpriseRelatedId;
that.partForm.memberOpenCardFlag = resData.result.memberOpenCardFlag; that.partForm.memberOpenCardFlag = resData.result.memberOpenCardFlag;
that.partForm.wxEnterpriseType = resData.result.wxEnterpriseType; that.partForm.wxEnterpriseType = resData.result.wxEnterpriseType;
......
...@@ -48,10 +48,10 @@ ...@@ -48,10 +48,10 @@
</div> </div>
<div class="m-t-20"> <div class="m-t-20">
<el-table v-loading="loading" class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }"> <el-table v-loading="loading" class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
<el-table-column label="任务标题" show-overflow-tooltip width="87"> <el-table-column label="任务标题" show-overflow-tooltip min-width="170">
<template slot-scope="scope">{{ scope.row.taskTitle || '--' }}</template> <template slot-scope="scope">{{ scope.row.taskTitle || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="指派对象" width="176"> <el-table-column prop="" label="指派对象" min-width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex flex-align-center personal-info"> <div class="flex flex-align-center personal-info">
<el-image :src="scope.row.executeClerkClerkImgUrl || headDefault" fit="cover"></el-image> <el-image :src="scope.row.executeClerkClerkImgUrl || headDefault" fit="cover"></el-image>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="会员"> <el-table-column prop="" label="会员" min-width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex flex-align-center personal-info"> <div class="flex flex-align-center personal-info">
<el-image :src="scope.row.memberImgUrl || headDefault" fit="cover"></el-image> <el-image :src="scope.row.memberImgUrl || headDefault" fit="cover"></el-image>
...@@ -73,22 +73,22 @@ ...@@ -73,22 +73,22 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="创建时间"> <el-table-column prop="" label="创建时间" min-width="122">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="color-606266 line-20">{{ scope.row.createTime | timeStampToYmd }}</div> <div class="color-606266 line-20">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="color-606266 line-20">{{ scope.row.createTime | timeStampToHms }}</div> <div class="color-606266 line-20">{{ scope.row.createTime | timeStampToHms }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="逾期期限"> <el-table-column prop="" label="逾期期限" min-width="122">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="color-606266 line-20">{{ scope.row.overdueTime | timeStampToYmd }}</div> <div class="color-606266 line-20">{{ scope.row.overdueTime | timeStampToYmd }}</div>
<div class="color-606266 line-20">{{ scope.row.overdueTime | timeStampToHms }}</div> <div class="color-606266 line-20">{{ scope.row.overdueTime | timeStampToHms }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="逾期情况"> <el-table-column prop="" label="逾期情况" min-width="122">
<template slot-scope="scope"><span class="point" :style="'background:' + overdueStyle[scope.row.overdueStatus] + ';'"></span>{{ scope.row.overdueStatus === 1 ? '未逾期' : scope.row.overdueStatus === 2 ? '已逾期' : '' }}</template> <template slot-scope="scope"><span class="point" :style="'background:' + overdueStyle[scope.row.overdueStatus] + ';'"></span>{{ scope.row.overdueStatus === 1 ? '未逾期' : scope.row.overdueStatus === 2 ? '已逾期' : '' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="完成状态"> <el-table-column prop="" label="完成状态" min-width="122">
<template slot-scope="scope"><span class="point" :style="'background:' + taskStyle[scope.row.taskStatus] + ';'"></span>{{ scope.row.taskStatus === 1 ? '未完成' : scope.row.taskStatus === 2 ? '已完成' : '' }}</template> <template slot-scope="scope"><span class="point" :style="'background:' + taskStyle[scope.row.taskStatus] + ';'"></span>{{ scope.row.taskStatus === 1 ? '未完成' : scope.row.taskStatus === 2 ? '已完成' : '' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="完成详情"> <el-table-column prop="" label="完成详情">
...@@ -125,6 +125,14 @@ import errMsg from '@/common/js/error'; ...@@ -125,6 +125,14 @@ import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public'; import { _debounce } from '@/common/js/public';
export default { export default {
name: 'storeDetail', name: 'storeDetail',
props: {
brandId: {
type: String,
default() {
return '';
}
}
},
data() { data() {
return { return {
headDefault, headDefault,
...@@ -223,14 +231,20 @@ export default { ...@@ -223,14 +231,20 @@ export default {
*/ */
getTableList(val) { getTableList(val) {
const that = this; const that = this;
that.loading = true;
let para = { let para = {
...that.pageParams, ...that.pageParams,
enterpriseId: localStorage.getItem('userInfoBrandId'), enterpriseId: localStorage.getItem('userInfoBrandId'),
storeId: 'ff80808175acbdbd0175aff217960011' // storeId: 'ff80808175acbdbd0175aff217960011'
storeId: that.$route.params.id
// (ecmPlanId ) // (ecmPlanId )
}; };
if (this.$route.query.ecmPlanId) {
para.ecmPlanId = this.$route.query.ecmPlanId;
}
getRequest('/haoban-task-manage-web/market/clue/web/task-info-list', para) getRequest('/haoban-task-manage-web/market/clue/web/task-info-list', para)
.then(res => { .then(res => {
that.loading = false;
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
that.tableData = resData.result.list || []; that.tableData = resData.result.list || [];
...@@ -240,6 +254,7 @@ export default { ...@@ -240,6 +254,7 @@ export default {
} }
}) })
.catch(function(error) { .catch(function(error) {
that.loading = false;
that.$message.error({ that.$message.error({
duration: 1000, duration: 1000,
message: error.message message: error.message
...@@ -266,7 +281,6 @@ export default { ...@@ -266,7 +281,6 @@ export default {
}); });
}, },
showDetail(item) { showDetail(item) {
console.log(item);
const that = this; const that = this;
that.loading = true; that.loading = true;
const para = { const para = {
...@@ -302,7 +316,11 @@ export default { ...@@ -302,7 +316,11 @@ export default {
this.confirmDetail = {}; this.confirmDetail = {};
} }
}, },
watch: {}, watch: {
brandId(newV) {
this.getTableList();
}
},
mounted() { mounted() {
const that = this; const that = this;
that.getFilterOpts(); that.getFilterOpts();
......
...@@ -46,38 +46,29 @@ ...@@ -46,38 +46,29 @@
<el-date-picker class="m-l-10" prefix-icon="el-icon-time" :picker-options="pickerOptions" v-model="pageParams.date" @change="reFetch" :value-format="'yyyy-MM-dd'" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间"> </el-date-picker> <el-date-picker class="m-l-10" prefix-icon="el-icon-time" :picker-options="pickerOptions" v-model="pageParams.date" @change="reFetch" :value-format="'yyyy-MM-dd'" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间"> </el-date-picker>
</div> </div>
<div class="m-t-20"> <div class="m-t-20">
<el-table class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }"> <el-table v-loading="loading" class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
<el-table-column label="门店名称" show-overflow-tooltip> <el-table-column label="门店名称" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.storeName || '--' }}</template> <template slot-scope="scope">{{ scope.row.storeName || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="任务总数"> <el-table-column prop="" label="任务总数">
<template slot-scope="scope">{{ scope.row.taskCount || '--' }}</template> <template slot-scope="scope">{{ scope.row.taskCnt || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="已完成"> <el-table-column prop="" label="已完成">
<template slot-scope="scope">{{ scope.row.finishCount || '--' }}</template> <template slot-scope="scope">{{ scope.row.cplTaskCnt || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="完成率"> <el-table-column prop="" label="完成率">
<template slot-scope="scope">{{ scope.row.completionRate + '%' || '--' }}</template> <template slot-scope="scope">{{ (scope.row.completionRate * 100).toFixed(2) + '%' || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="待完成"> <el-table-column prop="" label="待完成">
<template slot-scope="scope">{{ scope.row.waitFinishCount || '--' }}</template> <template slot-scope="scope">{{ scope.row.waitFinishCount || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="逾期中"> <el-table-column prop="" label="逾期中">
<template slot-scope="scope">{{ scope.row.overdueCount || '--' }}</template> <template slot-scope="scope">{{ scope.row.ovincplTaskCnt || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="触达转化收益(元)">
<template slot-scope="scope">{{ scope.row.potentialProfit || '--' }}</template>
</el-table-column>
<!-- <el-table-column prop="" label="累计收益(元)">
<template slot-scope="scope">{{ scope.row.totalProfit || '--' }}</template>
</el-table-column>
<el-table-column prop="" label="潜在收益(元)">
<template slot-scope="scope">{{ scope.row.potentialProfit || '--' }}</template>
</el-table-column> -->
<el-table-column prop="" label="操作" width="150"> <el-table-column prop="" label="操作" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="showDetail(scope.row)">查看详情</el-button> <el-button type="text" size="small" @click="showDetail(scope.row)">查看详情</el-button>
<el-button type="text" size="small" @click="showDetail(scope.row)">删除</el-button> <!-- <el-button type="text" size="small" @click="showDetail(scope.row)">删除</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -100,11 +91,20 @@ import errMsg from '@/common/js/error'; ...@@ -100,11 +91,20 @@ import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public'; import { _debounce } from '@/common/js/public';
export default { export default {
name: 'storeList', name: 'storeList',
props: {
brandId: {
type: String,
default() {
return '';
}
}
},
data() { data() {
return { return {
bgHeight: window.screen.availHeight - 298 + 'px', bgHeight: window.screen.availHeight - 298 + 'px',
dateStart: new Date().getTime() - 3600 * 1000 * 24 * 365, dateStart: new Date().getTime() - 3600 * 1000 * 24 * 365,
dateEnd: new Date(), dateEnd: new Date(),
loading: false,
// 面包屑参数 // 面包屑参数
navpath: [ navpath: [
{ {
...@@ -123,17 +123,16 @@ export default { ...@@ -123,17 +123,16 @@ export default {
// 分页参数 // 分页参数
total: 0, total: 0,
tableData: [ tableData: [
{ // {
storeId: '12121', // storeId: '', // 门店id
storeName: '12', // storeName: '', // 门店名称
taskCount: 111, // taskCnt: '', // 任务总数
finishCount: 34, // cplTaskCnt: '', // 任务完成数
completionRate: '12', // completionRate: '', // 任务完成率
waitFinishCount: 77, // waitFinishCount: '', // 待完成数
overdueCount: 23, // itincplTaskCnt: '', // 未逾期任务未完成数
totalProfit: 3424123, // ovincplTaskCnt: '', // 逾期任务未完成数
potentialProfit: 43242 // }
}
], ],
pickerOptions: { pickerOptions: {
disabledDate: time => { disabledDate: time => {
...@@ -184,14 +183,23 @@ export default { ...@@ -184,14 +183,23 @@ export default {
*/ */
getTableList(val) { getTableList(val) {
const that = this; const that = this;
let para = { ...that.pageParams }; that.loading = true;
let para = {
...that.pageParams,
enterpriseId: localStorage.getItem('userInfoBrandId'),
qywxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId
};
if (para.date) { if (para.date) {
para.startTime = para.date[0]; para.startTime = para.date[0];
para.endTime = para.date[1]; para.endTime = para.date[1];
delete para.date; delete para.date;
} }
getRequest('/haoban-manage3-web/store-full-list', para) if (that.$route.query.ecmPlanId) {
para.ecmPlanId = that.$route.query.ecmPlanId;
}
getRequest('/haoban-task-manage-web/market/clue/web/store-list', para)
.then(res => { .then(res => {
that.loading = false;
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
that.tableData = resData.result.list || []; that.tableData = resData.result.list || [];
...@@ -201,6 +209,7 @@ export default { ...@@ -201,6 +209,7 @@ export default {
} }
}) })
.catch(function(error) { .catch(function(error) {
that.loading = false;
that.$message.error({ that.$message.error({
duration: 1000, duration: 1000,
message: error.message message: error.message
...@@ -208,18 +217,27 @@ export default { ...@@ -208,18 +217,27 @@ export default {
}); });
}, },
showDetail(item) { showDetail(item) {
if (this.$route.query.gicTaskId) { if (this.$route.query.ecmPlanId) {
this.$router.push(`storeDetail/${item.storeId}?tab=2`); this.$router.push(`storeDetail/${item.storeId}?tab=2&ecmPlanId=${this.$route.query.ecmPlanId}`);
} else { } else {
this.$router.push(`storeDetail/${item.storeId}`); this.$router.push(`storeDetail/${item.storeId}`);
} }
} }
}, },
watch: {}, watch: {
brandId(newV) {
this.getTableList();
},
$route(to, from) {
if (!this.$route.query.ecmPlanId) {
this.getTableList();
}
}
},
mounted() { mounted() {
const that = this; const that = this;
// that.getTableList(); that.getTableList();
if (this.$route.query.gicTaskId) { if (this.$route.query.ecmPlanId) {
that.$emit('showTab', 2); that.$emit('showTab', 2);
} else { } else {
that.$emit('showTab', 1); that.$emit('showTab', 1);
......
...@@ -42,31 +42,28 @@ ...@@ -42,31 +42,28 @@
</el-popover> </el-popover>
</div> </div>
<div class="table-condition-search m-t-20"> <div class="table-condition-search m-t-20">
<el-input placeholder="请输入计划名称" prefix-icon="el-icon-search" v-model="pageParams.cluePlanName" class="w-260" @change="reFetch" clearable @clear="clearInput"> </el-input> <el-input placeholder="请输入计划名称" prefix-icon="el-icon-search" v-model="pageParams.ecmPlanName" class="w-260" @change="reFetch" clearable @clear="clearInput"> </el-input>
<el-date-picker class="m-l-10" prefix-icon="el-icon-time" :picker-options="pickerOptions" v-model="pageParams.date" @change="reFetch" :value-format="'yyyy-MM-dd'" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间"> </el-date-picker> <el-date-picker class="m-l-10" prefix-icon="el-icon-time" :picker-options="pickerOptions" v-model="pageParams.date" @change="reFetch" :value-format="'yyyy-MM-dd'" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间"> </el-date-picker>
</div> </div>
<div class="m-t-20"> <div class="m-t-20">
<el-table class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }"> <el-table v-loading="loading" class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
<el-table-column label="计划名称" show-overflow-tooltip> <el-table-column label="计划名称" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.cluePlanName || '--' }}</template> <template slot-scope="scope">{{ scope.row.ecmPlanName || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="任务总数"> <el-table-column prop="" label="任务总数">
<template slot-scope="scope">{{ scope.row.taskCount || '--' }}</template> <template slot-scope="scope">{{ scope.row.taskCnt || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="已完成"> <el-table-column prop="" label="已完成">
<template slot-scope="scope">{{ scope.row.finishCount || '--' }}</template> <template slot-scope="scope">{{ scope.row.cplTaskCnt || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="完成率"> <el-table-column prop="" label="完成率">
<template slot-scope="scope">{{ scope.row.completionRate + '%' || '--' }}</template> <template slot-scope="scope">{{ (scope.row.completionRate * 100).toFixed(2) + '%' || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="待完成"> <el-table-column prop="" label="待完成">
<template slot-scope="scope">{{ scope.row.waitFinishCount || '--' }}</template> <template slot-scope="scope">{{ scope.row.waitFinishCount || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="逾期中"> <el-table-column prop="" label="逾期中">
<template slot-scope="scope">{{ scope.row.overdueCount || '--' }}</template> <template slot-scope="scope">{{ scope.row.ovincplTaskCnt || '--' }}</template>
</el-table-column>
<el-table-column prop="" label="触达转化收益(元)">
<template slot-scope="scope">{{ scope.row.totalProfit || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="操作"> <el-table-column prop="" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -91,13 +88,23 @@ import navCrumb from '@/components/nav/nav.vue'; ...@@ -91,13 +88,23 @@ import navCrumb from '@/components/nav/nav.vue';
import { getRequest } from '@/api/api'; import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error'; import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public'; import { _debounce } from '@/common/js/public';
export default { export default {
name: 'taskList', name: 'taskList',
props: {
brandId: {
type: String,
default() {
return '';
}
}
},
data() { data() {
return { return {
bgHeight: window.screen.availHeight - 298 + 'px', bgHeight: window.screen.availHeight - 298 + 'px',
dateStart: new Date().getTime() - 3600 * 1000 * 24 * 365, dateStart: new Date().getTime() - 3600 * 1000 * 24 * 365,
dateEnd: new Date(), dateEnd: new Date(),
loading: false,
// 面包屑参数 // 面包屑参数
navpath: [ navpath: [
{ {
...@@ -116,17 +123,16 @@ export default { ...@@ -116,17 +123,16 @@ export default {
// 分页参数 // 分页参数
total: 0, total: 0,
tableData: [ tableData: [
{ // {
storeId: '12121', // enterpriseId: '', // 企业id
storeName: '12', // ecmPlanId: '', // 计划id
taskCount: 111, // ecmPlanName: '', // 计划名称
finishCount: 34, // taskCnt: '', // 任务总数
completionRate: '12', // cplTaskCnt: '', // 任务完成数
waitFinishCount: 77, // completionRate: '', // 任务完成率
overdueCount: 23, // itincplTaskCnt: '', // 未逾期任务未完成数
totalProfit: 3424123, // ovincplTaskCnt: '', // 逾期任务未完成数
potentialProfit: 43242 // }
}
], ],
pickerOptions: { pickerOptions: {
disabledDate: time => { disabledDate: time => {
...@@ -177,23 +183,31 @@ export default { ...@@ -177,23 +183,31 @@ export default {
*/ */
getTableList(val) { getTableList(val) {
const that = this; const that = this;
let para = { ...that.pageParams }; that.loading = true;
let para = {
...that.pageParams,
enterpriseId: localStorage.getItem('userInfoBrandId'),
qywxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId
};
if (para.date) { if (para.date) {
para.startTime = para.date[0]; para.startTime = para.date[0];
para.endTime = para.date[1]; para.endTime = para.date[1];
delete para.date; delete para.date;
} }
getRequest('/haoban-manage3-web/store-full-list', para) getRequest('/haoban-task-manage-web/market/clue/web/plan-list', para)
.then(res => { .then(res => {
that.loading = false;
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1 && resData.result) {
that.tableData = resData.result.list || []; that.tableData = resData.result.list || [];
that.total = resData.result.total; that.total = resData.result.total;
} else { } else {
that.tableData = [];
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
} }
}) })
.catch(function(error) { .catch(function(error) {
that.loading = false;
that.$message.error({ that.$message.error({
duration: 1000, duration: 1000,
message: error.message message: error.message
...@@ -201,13 +215,17 @@ export default { ...@@ -201,13 +215,17 @@ export default {
}); });
}, },
showDetail(item) { showDetail(item) {
this.$router.push(`storeList?gicTaskId=${item.gicTaskId}`); this.$router.push(`storeList?ecmPlanId=${item.ecmPlanId}`);
}
},
watch: {
brandId(newV) {
this.getTableList();
} }
}, },
watch: {},
mounted() { mounted() {
const that = this; const that = this;
// that.getTableList(); that.getTableList();
that.$emit('showTab', 2); that.$emit('showTab', 2);
document.documentElement.style.backgroundColor = '#f0f2f5'; document.documentElement.style.backgroundColor = '#f0f2f5';
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment