Commit d07a9803 by 陈羽

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

parent 54fdde7f
......@@ -34,7 +34,7 @@ export default {
dateToTime(val) {
console.log(val)
// console.log(val)
// (0-9)年月数字的显示
function formatDig(num) {
return num > 9 ? '' + num : '0' + num;
......
......@@ -387,7 +387,7 @@ export default {
});
},
handleSelectedList(data) {
console.log(data);
// console.log(data);
const that = this;
that.defaultStoreList = data || [];
that.saveGorupRange();
......@@ -432,7 +432,7 @@ export default {
*/
toChangeTemp(e, index, row) {
const that = this;
console.log(e, index, row)
// console.log(e, index, row)
let para = {
brandId: that.brandId,
memberTagGroupId: row.memberTagGroupId,
......
......@@ -106,7 +106,7 @@ export default {
if (status === 'complete' && result.info === 'OK') {
if (result && result.regeocode) {
/* eslint-disable */
console.log(result);
// console.log(result);
that.address = result.regeocode.formattedAddress;
that.ruleForm.address = result.regeocode.formattedAddress;
that.$nextTick();
......
......@@ -201,7 +201,7 @@ export default {
*/
handleSelectedList(group) {
const that = this;
console.log(group);
// console.log(group);
/* if (that.selectType === 'people') {
that.formData.peopleList = group;
} else */
......
......@@ -10,7 +10,6 @@
选择门店分组组件:
<gic-select-group
:selectData="selectData"
:checkedList="checkedList"
@checkGroupIds="checkGroupIds">
</gic-select-group>
......@@ -71,6 +70,7 @@ export default {
}
},
selectData: {
// 数据回显
type: [Object, Array],
default() {
return [];
......@@ -81,12 +81,6 @@ export default {
default() {
return '';
}
},
checkedList: {
type: [Object, Array],
default() {
return [];
}
}
},
data() {
......@@ -103,7 +97,7 @@ export default {
children: 'children',
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 {
}
return father.parentRelationId == 0; //返回第一层
});
console.log(tree);
return tree;
},
......@@ -227,8 +220,8 @@ export default {
that.$nextTick(() => {
that.groupData = JSON.parse(JSON.stringify(data)) || [];
that.groupDataCopy = JSON.parse(JSON.stringify(that.groupData)) || [];
if (that.checkedList) {
that.checkedListCopy = that.checkedList;
if (that.selectData) {
that.checkedListCopy = that.selectData;
}
});
that.$forceUpdate();
......@@ -250,16 +243,11 @@ export default {
let that = this;
if (!!newData.length) {
that.groupIds = newData;
that.checkedKeys = that.newData.map(ele => ele.relationId);
} else {
that.groupIds = [];
}
},
checkedList: function(newData, oldData) {
let that = this;
if (!!newData.length) {
that.checkedKeys = that.checkedList.map(ele => ele.relationId);
}
},
searchSelect(val) {
this.$refs.groupTree.filter(val);
},
......
......@@ -218,7 +218,7 @@ export default {
}
/* eslint-disable */
that.fileDatas = fileList;
console.log('fileList:', fileList, that.fileDatas)
// console.log('fileList:', fileList, that.fileDatas)
that.$nextTick(() => {
let list = [];
if (fileList.length) {
......
......@@ -125,7 +125,7 @@ export default {
/* eslint-disable */
beforeAvatarUpload(file) {
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' : '';
const isJPG = file.type === 'image/jpeg' || file.type === 'image/jpg' || file.type === 'image/png';
const isMP4 = file.type == 'video/mp4';
......
......@@ -314,7 +314,7 @@ export function scrollTo(element, to, duration) {
const difference = to - element.scrollTop;
const perTick = (difference / duration) * 10;
setTimeout(() => {
console.log(new Date());
// console.log(new Date());
element.scrollTop = element.scrollTop + perTick;
if (element.scrollTop === to) return;
scrollTo(element, to, duration - 10);
......
......@@ -93,14 +93,14 @@ function s2ab(s) {
export function export_table_to_excel(id) {
var theTable = document.getElementById(id);
console.log('a')
// console.log('a')
var oo = generateArray(theTable);
var ranges = oo[1];
/* original data */
var data = oo[0];
var ws_name = "SheetJS";
console.log(data);
// console.log(data);
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
......@@ -118,7 +118,7 @@ export function export_table_to_excel(id) {
}
function formatJson(jsonData) {
console.log(jsonData)
// console.log(jsonData)
}
export function export_json_to_excel(th, jsonData, defaultTitle) {
......
......@@ -58,7 +58,7 @@
<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>
</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-tooltip slot="label" class="item" effect="dark" :open-delay="200" placement="top-start">
......@@ -293,7 +293,7 @@ export default {
if (resData.errorCode == 1) {
let checkedList = [];
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.memberOpenCardFlag = resData.result.memberOpenCardFlag;
that.partForm.wxEnterpriseType = resData.result.wxEnterpriseType;
......
......@@ -48,10 +48,10 @@
</div>
<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-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>
</el-table-column>
<el-table-column prop="" label="指派对象" width="176">
<el-table-column prop="" label="指派对象" min-width="200">
<template slot-scope="scope">
<div class="flex flex-align-center personal-info">
<el-image :src="scope.row.executeClerkClerkImgUrl || headDefault" fit="cover"></el-image>
......@@ -62,7 +62,7 @@
</div>
</template>
</el-table-column>
<el-table-column prop="" label="会员">
<el-table-column prop="" label="会员" min-width="200">
<template slot-scope="scope">
<div class="flex flex-align-center personal-info">
<el-image :src="scope.row.memberImgUrl || headDefault" fit="cover"></el-image>
......@@ -73,22 +73,22 @@
</div>
</template>
</el-table-column>
<el-table-column prop="" label="创建时间">
<el-table-column prop="" label="创建时间" min-width="122">
<template slot-scope="scope">
<div class="color-606266 line-20">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="color-606266 line-20">{{ scope.row.createTime | timeStampToHms }}</div>
</template>
</el-table-column>
<el-table-column prop="" label="逾期期限">
<el-table-column prop="" label="逾期期限" min-width="122">
<template slot-scope="scope">
<div class="color-606266 line-20">{{ scope.row.overdueTime | timeStampToYmd }}</div>
<div class="color-606266 line-20">{{ scope.row.overdueTime | timeStampToHms }}</div>
</template>
</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>
</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>
</el-table-column>
<el-table-column prop="" label="完成详情">
......@@ -125,6 +125,14 @@ import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public';
export default {
name: 'storeDetail',
props: {
brandId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
headDefault,
......@@ -223,14 +231,20 @@ export default {
*/
getTableList(val) {
const that = this;
that.loading = true;
let para = {
...that.pageParams,
enterpriseId: localStorage.getItem('userInfoBrandId'),
storeId: 'ff80808175acbdbd0175aff217960011'
// storeId: 'ff80808175acbdbd0175aff217960011'
storeId: that.$route.params.id
// (ecmPlanId )
};
if (this.$route.query.ecmPlanId) {
para.ecmPlanId = this.$route.query.ecmPlanId;
}
getRequest('/haoban-task-manage-web/market/clue/web/task-info-list', para)
.then(res => {
that.loading = false;
let resData = res.data;
if (resData.errorCode == 1) {
that.tableData = resData.result.list || [];
......@@ -240,6 +254,7 @@ export default {
}
})
.catch(function(error) {
that.loading = false;
that.$message.error({
duration: 1000,
message: error.message
......@@ -266,7 +281,6 @@ export default {
});
},
showDetail(item) {
console.log(item);
const that = this;
that.loading = true;
const para = {
......@@ -302,7 +316,11 @@ export default {
this.confirmDetail = {};
}
},
watch: {},
watch: {
brandId(newV) {
this.getTableList();
}
},
mounted() {
const that = this;
that.getFilterOpts();
......
......@@ -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>
</div>
<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>
<template slot-scope="scope">{{ scope.row.storeName || '--' }}</template>
</el-table-column>
<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 prop="" label="已完成">
<template slot-scope="scope">{{ scope.row.finishCount || '--' }}</template>
<template slot-scope="scope">{{ scope.row.cplTaskCnt || '--' }}</template>
</el-table-column>
<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 prop="" label="待完成">
<template slot-scope="scope">{{ scope.row.waitFinishCount || '--' }}</template>
</el-table-column>
<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.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">
<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> -->
</template>
</el-table-column>
</el-table>
......@@ -100,11 +91,20 @@ import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public';
export default {
name: 'storeList',
props: {
brandId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
bgHeight: window.screen.availHeight - 298 + 'px',
dateStart: new Date().getTime() - 3600 * 1000 * 24 * 365,
dateEnd: new Date(),
loading: false,
// 面包屑参数
navpath: [
{
......@@ -123,17 +123,16 @@ export default {
// 分页参数
total: 0,
tableData: [
{
storeId: '12121',
storeName: '12',
taskCount: 111,
finishCount: 34,
completionRate: '12',
waitFinishCount: 77,
overdueCount: 23,
totalProfit: 3424123,
potentialProfit: 43242
}
// {
// storeId: '', // 门店id
// storeName: '', // 门店名称
// taskCnt: '', // 任务总数
// cplTaskCnt: '', // 任务完成数
// completionRate: '', // 任务完成率
// waitFinishCount: '', // 待完成数
// itincplTaskCnt: '', // 未逾期任务未完成数
// ovincplTaskCnt: '', // 逾期任务未完成数
// }
],
pickerOptions: {
disabledDate: time => {
......@@ -184,14 +183,23 @@ export default {
*/
getTableList(val) {
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) {
para.startTime = para.date[0];
para.endTime = para.date[1];
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 => {
that.loading = false;
let resData = res.data;
if (resData.errorCode == 1) {
that.tableData = resData.result.list || [];
......@@ -201,6 +209,7 @@ export default {
}
})
.catch(function(error) {
that.loading = false;
that.$message.error({
duration: 1000,
message: error.message
......@@ -208,18 +217,27 @@ export default {
});
},
showDetail(item) {
if (this.$route.query.gicTaskId) {
this.$router.push(`storeDetail/${item.storeId}?tab=2`);
if (this.$route.query.ecmPlanId) {
this.$router.push(`storeDetail/${item.storeId}?tab=2&ecmPlanId=${this.$route.query.ecmPlanId}`);
} else {
this.$router.push(`storeDetail/${item.storeId}`);
}
}
},
watch: {},
watch: {
brandId(newV) {
this.getTableList();
},
$route(to, from) {
if (!this.$route.query.ecmPlanId) {
this.getTableList();
}
}
},
mounted() {
const that = this;
// that.getTableList();
if (this.$route.query.gicTaskId) {
that.getTableList();
if (this.$route.query.ecmPlanId) {
that.$emit('showTab', 2);
} else {
that.$emit('showTab', 1);
......
......@@ -42,31 +42,28 @@
</el-popover>
</div>
<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>
</div>
<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>
<template slot-scope="scope">{{ scope.row.cluePlanName || '--' }}</template>
<template slot-scope="scope">{{ scope.row.ecmPlanName || '--' }}</template>
</el-table-column>
<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 prop="" label="已完成">
<template slot-scope="scope">{{ scope.row.finishCount || '--' }}</template>
<template slot-scope="scope">{{ scope.row.cplTaskCnt || '--' }}</template>
</el-table-column>
<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 prop="" label="待完成">
<template slot-scope="scope">{{ scope.row.waitFinishCount || '--' }}</template>
</el-table-column>
<el-table-column prop="" label="逾期中">
<template slot-scope="scope">{{ scope.row.overdueCount || '--' }}</template>
</el-table-column>
<el-table-column prop="" label="触达转化收益(元)">
<template slot-scope="scope">{{ scope.row.totalProfit || '--' }}</template>
<template slot-scope="scope">{{ scope.row.ovincplTaskCnt || '--' }}</template>
</el-table-column>
<el-table-column prop="" label="操作">
<template slot-scope="scope">
......@@ -91,13 +88,23 @@ import navCrumb from '@/components/nav/nav.vue';
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public';
export default {
name: 'taskList',
props: {
brandId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
bgHeight: window.screen.availHeight - 298 + 'px',
dateStart: new Date().getTime() - 3600 * 1000 * 24 * 365,
dateEnd: new Date(),
loading: false,
// 面包屑参数
navpath: [
{
......@@ -116,17 +123,16 @@ export default {
// 分页参数
total: 0,
tableData: [
{
storeId: '12121',
storeName: '12',
taskCount: 111,
finishCount: 34,
completionRate: '12',
waitFinishCount: 77,
overdueCount: 23,
totalProfit: 3424123,
potentialProfit: 43242
}
// {
// enterpriseId: '', // 企业id
// ecmPlanId: '', // 计划id
// ecmPlanName: '', // 计划名称
// taskCnt: '', // 任务总数
// cplTaskCnt: '', // 任务完成数
// completionRate: '', // 任务完成率
// itincplTaskCnt: '', // 未逾期任务未完成数
// ovincplTaskCnt: '', // 逾期任务未完成数
// }
],
pickerOptions: {
disabledDate: time => {
......@@ -177,23 +183,31 @@ export default {
*/
getTableList(val) {
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) {
para.startTime = para.date[0];
para.endTime = para.date[1];
delete para.date;
}
getRequest('/haoban-manage3-web/store-full-list', para)
getRequest('/haoban-task-manage-web/market/clue/web/plan-list', para)
.then(res => {
that.loading = false;
let resData = res.data;
if (resData.errorCode == 1) {
if (resData.errorCode == 1 && resData.result) {
that.tableData = resData.result.list || [];
that.total = resData.result.total;
} else {
that.tableData = [];
errMsg.errorMsg(resData);
}
})
.catch(function(error) {
that.loading = false;
that.$message.error({
duration: 1000,
message: error.message
......@@ -201,13 +215,17 @@ export default {
});
},
showDetail(item) {
this.$router.push(`storeList?gicTaskId=${item.gicTaskId}`);
this.$router.push(`storeList?ecmPlanId=${item.ecmPlanId}`);
}
},
watch: {
brandId(newV) {
this.getTableList();
}
},
watch: {},
mounted() {
const that = this;
// that.getTableList();
that.getTableList();
that.$emit('showTab', 2);
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