Commit 5cd73945 by 陈羽

update: 通讯录

parent a9784113
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2020-02-08 10:27:21
* @LastEditors: 无尘
* @LastEditTime: 2020-08-26 09:57:29
-->
<!--
选择门店分组组件:
<gic-select-group
:selectData="selectData"
@checkGroupIds="checkGroupIds">
</gic-select-group>
import gicSelectGroup from '@/components/common/gic-select-group.vue';
checkGroupIds: function(nodes) {
const that = this;
that.conditionObj.groupIds = nodes;
},
-->
<template>
<el-popover placement="bottom-start" style="min-width: 357px" v-model="departmentVisible">
<div class="select-search authMerchant">
<el-input placeholder="请输入内容" maxlength="50" v-model="searchSelect" style="width: 100%;" @keyup.native="value => toInput(value, searchSelect)" @clear="clearSearch"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
</div>
<div class="select-tree-wrap m-t-10">
<!--:load="loadNode"-->
<el-tree :filter-node-method="filterNode" clearable :data="groupData" :default-checked-keys="checkedKeys" node-key="relationId" ref="groupTree" check-strictly show-checkbox default-expand-all :props="defaultProps" :expand-on-click-node="false" @check="checkGroup">
<div class="custom-tree-node" slot-scope="{ data }">
<p>
<span :class="['font-14 p-r-10 iconfont', 'iconqiye-tianchong', data.isBind == 1 ? 'color-2f54eb' : 'color-dedfe6']"></span><span class="font-14 color-606266">{{ data.label }}</span>
</p>
<p class="color-909399 font-12">{{ data.isBind ? data.wxEnterpriseName + '已授权' : '' }}</p>
</div>
</el-tree>
</div>
<div class="flex-column item-cell-select inline-block " slot="reference">
<div class="depart-item-wrap">
<div :style="{ width: width }" class="el-select el-select--large depart-item-content">
<span class="font-14 color-c0c4cc p-l-10" style="display: inline-block;line-height: 32px;color: #c0c4cc;" v-if="!groupIds.length">请选择门店分组</span>
<div class="el-select__tags" style="max-width: 348px;">
<span style="display:block">
<template v-for="(item, index) in groupIds">
<span class="el-tag el-tag--info el-tag--small" :key="index">
<span class="el-select__tags-text">{{ item.relationName }}</span>
<i class="el-tag__close el-icon-close" @click.stop="delDepart(index, groupIds)"></i>
</span>
</template>
</span>
</div>
</div>
</div>
</div>
</el-popover>
</template>
<script>
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public';
export default {
name: 'gic-select-group',
props: {
width: {
type: String,
default() {
return '357px';
}
},
selectData: {
type: [Object, Array],
default() {
return [];
}
},
brandId: {
type: String,
default() {
return '';
}
},
checkedList: {
type: [Object, Array],
default() {
return [];
}
}
},
data() {
return {
projectName: '', // 当前项目名
enterpriseId: this.brandId,
searchSelect: '', // 搜索字段
departmentVisible: false,
groupIds: [],
groupData: [],
checkedListCopy: [],
groupDataCopy: [],
defaultProps: {
children: 'children',
label: 'storeGroupName'
},
checkedKeys: this.selectData.length ? this.selectData.map(ele => ele.departmentId) : []
};
},
methods: {
filterNode(value, data) {
if (!value || !data.label) return true;
return data.label.indexOf(value) !== -1;
},
/**
* 加载更多
*/
async loadNode(node, resolve) {
const that = this;
if (node.level === 0) {
return resolve(that.getGroup());
} else {
await that.getGroup(node, node.data, resolve);
}
},
/**
* 输入
*/
toInput: _debounce(function(e, value) {
const that = this;
// that.getGroup();
if (!that.groupDataCopy.length) {
return false;
}
}, 500),
/**
* 清空
*/
clearSearch() {
const that = this;
that.groupData = JSON.parse(JSON.stringify(that.groupDataCopy));
},
/**
* 删除
*/
delDepart(index, arr) {
const that = this;
arr.splice(index, 1);
const keys = arr.map(ele => ele.storeGroupId);
that.setCheckedKeys(keys);
},
/**
* 选择 tree 节点,获取选择节点信息
*/
checkGroup: function(e) {
const that = this;
that.groupIds = that.$refs.groupTree.getCheckedNodes();
that.$emit('checkGroupIds', that.$refs.groupTree.getCheckedNodes());
},
/**
* 设置 tree
*/
setCheckedKeys(keys) {
const that = this;
that.$refs.groupTree.setCheckedKeys(keys);
that.$emit('checkGroupIds', that.$refs.groupTree.getCheckedNodes());
},
/**
* 处理排序
*/
async handleSort(item) {
const that = this;
for (let i = 0; i < item.children.length; i++) {
item.children.sort(function(a, b) {
return a.storeGroupSort - b.storeGroupSort;
});
if (item.children[i].length) {
await that.handleSort(item.children[i]);
}
}
},
/**
* 简单数组-->父子数组对象
*/
async treeData(data) {
// const that = this;
let tree = data.filter(father => {
// father.disabled = father.isBind ? true : false;
//循环所有项
let branchArr = data.filter(child => {
if ((father.relationId == child.parentRelationId && father.isBind) || child.isBind) {
child.disabled = true;
}
return father.relationId == child.parentRelationId; //返回每一项的子级数组
});
if (branchArr.length > 0) {
father.children = branchArr; //如果存在子级,则给父级添加一个children属性,并赋值
}
return father.parentRelationId == 0; //返回第一层
});
return tree;
},
/**
* 获取门店分组
*/
async getGroup() {
const that = this;
let para = {
enterpriseId: that.brandId
};
getRequest('/haoban-manage3-web/gic-store-group-list', para)
.then(async res => {
let resData = res.data;
if (resData.errorCode == 1) {
if (!!resData.result && !!resData.result.length) {
resData.result.forEach(ele => {
ele.label = ele.relationName;
ele.relationName = ele.relationName;
});
const data = await that.treeData(resData.result);
that.$nextTick(() => {
that.groupData = JSON.parse(JSON.stringify(data)) || [];
that.groupDataCopy = JSON.parse(JSON.stringify(that.groupData)) || [];
if (that.checkedList) {
that.checkedListCopy = that.checkedList;
}
});
that.$forceUpdate();
}
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
selectData: function(newData, oldData) {
let that = this;
if (!!newData.length) {
that.groupIds = newData;
} else {
that.groupIds = [];
}
},
searchSelect(val) {
this.$refs.groupTree.filter(val);
},
brandId(val) {
const that = this;
if (val) {
that.searchSelect = '';
that.groupIds = [];
that.groupData = [];
that.groupDataCopy = [];
that.getGroup();
}
},
checkedListCopy(val) {
this.$nextTick(() => {
val.forEach(i => {
const node = this.$refs.groupTree.getNode(i);
this.groupIds.push(node.data);
if (node.isLeaf) {
this.$refs.groupTree.setChecked(node, true);
}
});
});
}
},
mounted() {
const that = this;
// 对否有默认选中数据
if (!!that.selectData.length) {
that.groupIds = that.selectData;
} else {
that.groupIds = [];
}
that.getGroup();
}
};
</script>
<style lang="scss" scoped>
.depart-item-content {
width: 213px;
height: 32px;
overflow: hidden;
white-space: nowrap;
border-radius: 2px;
border: 1px solid #c4c6cf;
cursor: pointer;
box-sizing: border-box;
}
.select-tree-wrap {
max-height: 300px;
overflow-y: auto;
.custom-tree-node {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
width: 100%;
padding-right: 12px;
}
}
.item-cell-select {
>>> .el-select__tags {
white-space: nowrap;
overflow: hidden;
}
.el-select {
.el-tag {
border-radius: 2px;
border: 1px solid rgba(220, 223, 230, 1);
background-color: #fff;
.el-tag__close {
top: 1px;
color: #909399;
&:hover {
background-color: transparent;
}
}
}
}
}
.authMerchant {
width: 323px;
}
</style>
<!--
* @Descripttion: 销售线索-门店任务-任务详情-完成详细信息
* @version: 1.0.0
* @Author: 阿羽
* @Date: 2021-04-13 17:57:01
* @LastEditors: 阿羽
* @LastEditTime: 2021-04-13 17:57:01
-->
<!--
<salesleads-taskinfo :item="item"></salesleads-taskinfo>
import salesleadsTaskinfo from '@/components/review/salesleads-task-info.vue';
-->
<template>
<el-dialog title="完成详情" :visible.sync="dialogVisible" width="600px">
<div class="">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
<el-form-item label="完成时间" prop="appName"> </el-form-item>
<el-form-item label="完成方式" prop="appId"> </el-form-item>
<el-form-item label="备注" prop="title"> </el-form-item>
<el-form-item label="图片" prop="title"> </el-form-item>
</el-form>
</div>
</el-dialog>
</template>
<script>
export default {
props: {
item: {
type: Object,
default() {
return {};
}
}
},
components: {},
data() {
return {
dialogVisible: true,
form: {
appName: '',
appId: '',
title: ''
}
};
},
methods: {},
watch: {
item(newData) {
const that = this;
if (Object.keys(newData).length) {
that.$nextTick(() => {
that.ruleForm = JSON.parse(JSON.stringify(newData));
});
}
}
},
mounted() {
const that = this;
if (Object.keys(that.item).length) {
that.$nextTick(() => {
that.ruleForm = JSON.parse(JSON.stringify(that.item));
});
}
}
};
</script>
<style lang="scss" scoped></style>
<!--
* @Descripttion: 当前组件信息
* @Descripttion:企业信息-新增小程序
* @version: 1.0.0
* @Author: 阿羽
* @Date: 2021-04-12 15:57:24
......
<!--
* @Descripttion:素材库-分配企业
* @version: 1.0.0
* @Author: 阿羽
* @Date: 2021-04-12 15:57:24
* @LastEditors: 阿羽
* @LastEditTime: 2021-04-12 15:57:24
-->
<!--
<distribution-enterprise :id="enterpriseId" v-if="showDistribution" @closeText="closeText" @submitText="submitText"></distribution-enterprise>
<script>
import distributionEnterprise from '@/components/set/distribution-enterprise.vue';
export default {
data() {
return {
enterpriseId:'',
showDistribution: false
};
},
methods: {
closeText() {
const that = this;
that.showDistribution = false;
that.editRow = {};
},
submitText() {
const that = this;
that.showDistribution = false;
that.editRow = {};
that.$emit('refreshTable');
},
}
-->
<template>
<el-dialog title="分配企业" :visible.sync="dialogVisible" width="490px" class="distribution-enterprise">
<div>
<el-form :model="form" :rules="rules" ref="ruleForm" class="demo-ruleForm">
<el-form-item>
<p class="check-all">
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">全选</el-checkbox>
</p>
<el-form-item prop="checkedList">
<el-checkbox-group v-model="form.checkedList" name="checkedList" @change="handleCheckedListChange">
<el-checkbox v-for="(opt, index) in options" name="checkedList" :label="opt.id" :key="index">
<p class="name">{{ opt.name }}</p>
<p class="subname">{{ opt.subname }}</p>
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="toCancel">取消</el-button>
<el-button type="primary" @click="submitForm('ruleForm')">分配</el-button>
</div>
</el-dialog>
</template>
<script>
import { _debounce } from '@/common/js/public';
import { postRequest } from '@/api/api';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
const options = [
{ id: 1, name: '上海', subname: 'xiaosh' },
{ id: 2, name: '北京', subname: 'xiaosh' },
{ id: 3, name: '广州', subname: 'xiaosh' },
{ id: 4, name: '北京', subname: 'xiaosh' }
];
export default {
props: {
id: {
type: String,
default: ''
},
show: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: true,
ruleForm: {
enterpriseId: ''
},
rules: {
checkedList: [{ type: 'array', required: true, message: '请选择企业', tigger: 'change' }]
},
checkAll: false,
form: { checkedList: [] },
options,
isIndeterminate: false
};
},
methods: {
toCancel() {
this.dialogVisible = false;
},
submitForm: _debounce(function(formName) {
const that = this;
that.$refs[formName].validate(valid => {
if (valid) {
that.postSave();
}
});
}, 300),
postSave() {
showMsg.showmsg('操作成功', 'success');
this.$emit('submitText');
return;
const that = this;
const data = { ...that.ruleForm };
postRequest('/haoban-manage3-web/', data)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('操作成功', 'success');
that.$emit('submitText');
} else {
errMsg.errorMsg(resData);
}
})
.catch(error => {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
handleCheckAllChange(val) {
if (val) {
this.options.map(item => {
this.form.checkedList.push(item.id);
});
} else {
this.form.checkedList = [];
}
this.isIndeterminate = false;
},
handleCheckedListChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.options.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.options.length;
},
getOptions() {
this.$refs['ruleForm'].resetFields();
console.log(this.id);
}
},
watch: {
show(newV, oldV) {
console.log(newV);
this.dialogVisible = true;
}
},
mounted() {
const that = this;
if (that.id) {
that.$nextTick(() => {
this.getOptions();
});
}
}
};
</script>
<style lang="scss" scoped>
.distribution-enterprise {
>>> .el-dialog {
height: 429px;
}
>>> .el-dialog__header {
padding: 16px 0 10px 20px;
.el-dialog__title {
display: block;
line-height: 25px;
}
}
>>> .el-dialog__body {
padding: 12px 16px 0 17px;
.check-all {
width: 100%;
height: 40px;
box-sizing: border-box;
background: #f5f7fa;
padding-left: 28px;
margin-bottom: 18px;
}
.el-checkbox-group {
height: 248px;
box-sizing: content-box;
overflow: scroll;
padding-left: 28px;
.el-checkbox {
display: flex;
justify-content: flex-start;
align-items: flex-start;
margin: 0 0 20px;
.name {
font-size: 14px;
color: #303133;
line-height: 14px;
margin-bottom: 6px;
}
.subname {
font-size: 14px;
color: #909399;
line-height: 20px;
}
}
}
}
>>> .el-dialog__footer {
padding-top: 16px;
padding-bottom: 20px;
}
}
</style>
<style lang="scss"></style>
......@@ -43,6 +43,7 @@
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="toDistribute(scope.$index, scope.row)">分配企业</el-button>
<el-button type="text" @click="toEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="text" @click="toDel(scope.$index, scope.row)">删除</el-button>
</template>
......@@ -52,9 +53,11 @@
<dm-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </dm-pagination>
</div>
<text-edit v-if="textShow" :editRow="editRow" :categoryId="categoryId" @closeText="closeText" @submitText="submitText"></text-edit>
<distribution-enterprise :id="editRow.enterpriseId" :show="showDistribution" @closeText="closeTextDistribution" @submitText="submitTextDistribution"></distribution-enterprise>
</div>
</template>
<script>
import distributionEnterprise from '@/components/set/distribution-enterprise.vue';
import textEdit from '@/components/set/text-edit.vue';
import { postRequest } from '@/api/api';
// import { _debounce } from '@/common/js/public';
......@@ -104,7 +107,8 @@ export default {
tableData: [],
multipleSelection: [],
textShow: false,
editRow: {}
editRow: {},
showDistribution: false
};
},
computed: {},
......@@ -123,6 +127,27 @@ export default {
that.editRow = {};
that.$emit('refreshTable');
},
closeTextDistribution() {
const that = this;
that.showDistribution = false;
that.editRow = {};
},
submitTextDistribution() {
const that = this;
that.showDistribution = false;
that.editRow = {};
that.$emit('refreshTable');
},
/**
* 编辑
*/
toDistribute(index, row) {
console.log(1);
const that = this;
that.showDistribution = true;
that.editRow = row;
console.log(this.showDistribution);
},
/**
* 编辑
*/
......@@ -243,7 +268,8 @@ export default {
}
},
components: {
textEdit
textEdit,
distributionEnterprise
}
};
</script>
......
......@@ -98,7 +98,7 @@ export default {
let host = window.location.origin;
let baseUrl;
if (host.indexOf('localhost') != '-1') {
baseUrl = 'http://www.gicdev.com';
baseUrl = 'https://www.gicdev.com';
} else {
baseUrl = host;
}
......
......@@ -91,6 +91,13 @@ export default {
url: '/enterpriseSet?/adminList',
parentCode: null,
project: 'office'
},
{
menuCode: null,
rightName: '销售线索',
url: '/salesleads?/storeList',
parentCode: null,
project: 'office'
}
// {
// menuCode: null,
......
......@@ -85,6 +85,16 @@ export const constantRouterMap = [
path: '/authMerchant',
name: '授权商户',
component: _import('business', 'authMerchant')
},
{
path: '/authMerchantForm',
name: '新建授权商户',
component: _import('business', 'authMerchant-form')
},
{
path: '/merchantStoreList',
name: '绑定门店列表',
component: _import('business', 'storeList')
}
]
},
......@@ -118,6 +128,40 @@ export const constantRouterMap = [
}
]
},
// 销售线索
{
path: '/salesleads',
name: '销售线索',
redirect: 'storeList',
component: _import('salesleads', 'index'),
children: [
{
path: '/storeList',
name: '门店视图',
component: _import('salesleads', 'storeList'),
},
{
path: '/storeDetail/:id',
name: '门店视图',
component: _import('salesleads', 'storeDetail')
},
{
path: '/taskList',
name: '计划视图',
component: _import('salesleads', 'taskList'),
},
{
path: '/taskDetail/:id',
name: '计划视图',
component: _import('salesleads', 'taskDetail')
},
{
path: '/salesleadsSet',
name: '销售线索设置',
component: _import('salesleads', 'salesleadsSet')
}
]
},
{
// 企业数据
path: '/enterpriseData',
......
<template>
<el-dialog width="600px" title="授权校验" class="authMerchant-dailog" :visible.sync="memberVisible" append-to-body :before-close="handleClose">
<div>
<div role="alert" class="el-alert el-alert--info flex w-327 bg-F0F5FF">
<i class="el-alert__icon el-icon-warning font-12 color-2f54eb m-r-9"></i>
<span class="el-alert__title color-303133 font-13">授权商户需要校验GIC商户超级管理员手机号 </span>
</div>
<el-form :model="partForm" :rules="rules" ref="form" label-width="140px" class="dialog-form">
<el-form-item label="超级管理员">
{{ partForm.clerkName | formatName }}
</el-form-item>
<el-form-item label="超级管理员手机号" prop=""
><span v-if="partForm.phoneNumber">{{ partForm.nationCode }}-</span>{{ partForm.phoneNumber | formatPhoneNum }} <el-button class="m-l-35" :disabled="!partForm.phoneNumber" type="text" @click="sendCode()">{{ (disableBtn && countNum == 60) || (!disableBtn && !!countNum) ? '点击短信验证' : countNum + 's' }}</el-button>
</el-form-item>
<el-form-item label="短信验证码" prop="code">
<el-input style="width: 180px;line-height:40px;" maxlength="20" v-model="partForm.code" placeholder="请输入验证码"></el-input>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel('form')">取消</el-button>
<el-button type="primary" @click="submitForm('form')">确定</el-button>
</div>
</el-dialog>
</template>
<script>
import { getRequest, postRequest } from '@/api/api';
import errMsg from '@/common/js/error';
import showMsg from '@/common/js/showmsg';
import { _debounce } from '@/common/js/public';
// import PhoneNumber from 'awesome-phonenumber';
export default {
name: 'authMerchant-dailog',
components: {},
props: {
item: {
type: Object,
default() {
return { version: '3.0', clerkName: '', enterpriseId: '', enterpriseName: '', nationCode: '86', phoneNumber: '', code: '' };
}
}
},
data() {
return {
wxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId,
memberVisible: true,
partForm: {},
rules: {
code: [
{
required: true,
message: '请输入验证码',
trigger: 'blur'
}
]
},
disableBtn: true, // 发验证码.默认无手机号,不可点击
countNum: 60
};
},
methods: {
/**
* 倒计时
*/
countDown() {
const that = this;
let time = setInterval(function() {
if (that.countNum === 0) {
clearInterval(time);
that.countNum = 60;
that.disableBtn = false;
return false;
}
that.countNum--;
}, 1000);
},
/**
* 发送验证码
*/
sendCode: _debounce(function() {
const that = this;
if (that.partForm.phoneNumber == '' || isNaN(String(that.partForm.phoneNumber))) {
showMsg.showmsg(`超级管理员手机号不正确,请到 GIC 商户后台修改`, 'warning');
return false;
}
/* if (that.partForm.nationCode == '' || isNaN(String(that.partForm.nationCode))) {
showMsg.showmsg(`国家码不存在`, 'warning');
return false;
} */
let params = {
phoneNumber: that.partForm.phoneNumber,
nationCode: that.partForm.nationCode || '86',
type: 1
// isTest: 1 // 测试时使用
};
getRequest('/haoban-manage3-web/send-code', params)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.disableBtn = true;
that.countDown();
const phone = String(that.partForm.phoneNumber);
let handle = phone.substr(0, 3) + '****' + phone.substr(7, phone.length - 1);
showMsg.showmsg(`已发送验证码到${that.partForm.nationCode || '86'}-${handle}`, 'success');
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}, 300),
/**
* 校验验证码
*/
checkCode() {
const that = this;
let params = {
phoneNumber: that.partForm.phoneNumber,
nationCode: that.partForm.nationCode,
type: 1,
code: that.partForm.code
};
return new Promise((resolve, reject) => {
getRequest('/haoban-manage3-web/validate-code', params)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
resolve(true);
return false;
}
errMsg.errorMsg(resData);
resolve(false);
})
.catch(function(error) {
resolve(false);
that.$message.error({
duration: 1000,
message: error.message
});
});
});
},
/**
* 关闭弹窗
*/
handleClose(done) {
const that = this;
that.$refs['form'].resetFields();
that.$emit('refreshData', 'close');
done();
},
cancel() {
const that = this;
that.$refs['form'].resetFields();
that.$emit('refreshData', 'close');
},
/**
* 确定保存
*/
async submitForm(form) {
const that = this;
if (!that.partForm.enterpriseId) {
return false;
}
that.$refs[form].validate(async valid => {
if (valid) {
that.$emit('refreshData', 'success');
// const flag = await that.checkCode();
// if (!flag) {
// return false;
// }
// that.toAddPost();
} else {
return false;
}
});
},
toAddPost() {
const that = this;
let params = {
enterpriseId: that.partForm.enterpriseId,
wxEnterpriseId: that.wxEnterpriseId,
version: that.partForm.version
};
postRequest('/haoban-manage3-web/wx-enterprise-bind', params)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.$emit('refreshData');
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 获取数据
*/
getData() {
const that = this;
let params = {
staffId: that.partForm.staffId
};
getRequest('/haoban-manage3-web/staff-add', params)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.partForm = resData.result;
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
item(newData) {
const that = this;
if (Object.keys(this.item).length) {
that.$nextTick(() => {
that.partForm = JSON.parse(JSON.stringify(this.item));
});
}
}
},
mounted() {
const that = this;
if (Object.keys(that.item).length) {
that.$nextTick(() => {
that.partForm = JSON.parse(JSON.stringify(this.item));
});
}
}
};
</script>
<style lang="scss" scoped>
.m-l-35 {
margin-left: 35px;
}
.m-r-9 {
margin-right: 9px;
}
.w-327 {
width: 327px;
}
.font-12 {
font-size: 12px;
}
.el-alert--info {
height: 32px;
padding: 0 0 0 17px;
margin-bottom: 12px;
background: #f0f5ff;
border: 1px solid #85a5ff;
border-radius: 2px;
}
.authMerchant-dailog {
>>> .el-dialog__body {
padding-top: 8px;
padding-left: 21px;
}
>>> .el-form-item {
margin-bottom: 0;
>>> .el-form-item__label {
line-height: 40px;
}
}
>>> .el-dialog__footer {
padding-top: 9px;
}
}
</style>
<style>
.authMerchant-dailog .el-form-item .el-form-item__label {
line-height: 40px;
}
</style>
......@@ -13,13 +13,21 @@
<div class="right-box" style="min-height: calc(100vh - 104px);">
<div class="apps-content flex" style="min-height: calc(100vh - 104px);">
<div class="apps-content-right">
<div class="flex flex-space-between">
<div></div>
<el-button type="primary" @click="showAddDialog">新建授权</el-button>
<div class="flex flex-space-between flex-align-center">
<div class="overstore-tip">
<div role="alert" class="el-alert el-alert--info flex flex-align-center">
<i class="el-alert__icon el-icon-warning font-13 color-2f54eb"></i>
<div class="el-alert__content">
<p class="el-alert__title color-303133 font-13">绑定门店:绑定门店拥有门店资源管理权限。能查看数据,绑定导购账号,管理门店等。</p>
<p class="el-alert__title color-303133 font-13">刷新门店:编辑或修改绑定门店范围,手动刷新获取最近门店列表。</p>
</div>
</div>
</div>
<div><span class="color-909399 font-13 m-r-19">最多授权 10 个商户</span><el-button type="primary" @click="AddAuthMerchant">新建授权</el-button></div>
</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-column prop="" label="商户列表" show-overflow-tooltip>
<el-table class="select-table" ref="multipleTable" v-loading="loading" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
<el-table-column prop="" label="审核事项" show-overflow-tooltip>
<template slot-scope="scope">
<div class="ul-li-cell flex">
<div class="cell-img">
......@@ -27,10 +35,10 @@
</div>
<div class="cell-info">
<div class="cell-info-name flex font-14 color-303133">
<span class="gic-name">{{ scope.row.enterpriseName || '--' }}</span
><span class="gic-version">{{ scope.row.version }}</span>
<span class="gic-name color-606266">{{ scope.row.enterpriseName || '--' }}</span
><span class="gic-version color-606266">{{ scope.row.version || '3.0' }}</span>
</div>
<div class="cell-info-name flex font-14 color-303133">
<div class="cell-info-name flex font-14 color-606266">
<span class="gic-name">{{ scope.row.brandName || '--' }}</span>
</div>
</div>
......@@ -38,12 +46,21 @@
</template>
</el-table-column>
<el-table-column prop="" label="提交人" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.staffName || '--' }}</template>
<template slot-scope="scope"
><span class="color-606266">{{ scope.row.staffName || '--' }}</span></template
>
</el-table-column>
<el-table-column prop="" label="完成时间" show-overflow-tooltip>
<template slot-scope="scope">
<div class="line-18">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="line-18">{{ scope.row.createTime | timeStampToHms }}</div>
<div class="line-18 color-606266">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="line-18 color-606266">{{ scope.row.createTime | timeStampToHms }}</div>
</template>
</el-table-column>
<el-table-column prop="" label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="AddAuthMerchant(scope.row)">编辑授权设置</el-button>
<el-button type="text" size="small" @click="toStoreList(scope.row)">绑定门店列表</el-button>
<el-button slot="reference" type="text" size="small" @click="refreshStoreBind(scope.row)">刷新门店</el-button>
</template>
</el-table-column>
</el-table>
......@@ -56,11 +73,9 @@
</div>
</div>
<!-- <vue-gic-footer></vue-gic-footer> -->
<add-enterprise v-if="addShow" @refreshData="refreshData"></add-enterprise>
</div>
</template>
<script>
import addEnterprise from '@/components/company/add-enterprise.vue';
import navCrumb from '@/components/nav/nav.vue';
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
......@@ -85,7 +100,7 @@ export default {
path: ''
}
],
loading: true,
// 分页参数
currentPage: 1,
pageSize: 20,
......@@ -99,9 +114,12 @@ export default {
/**
* 新增企业
*/
showAddDialog() {
const that = this;
that.addShow = true;
AddAuthMerchant(item) {
if (item.enterpriseId) {
this.changeRoute(`authMerchantForm?enterprise=${item.enterpriseId}`);
} else {
this.changeRoute(`authMerchantForm`);
}
},
refreshData(res) {
const that = this;
......@@ -118,6 +136,9 @@ export default {
changeRoute(path) {
this.$router.push(path);
},
toStoreList(item) {
this.changeRoute(`merchantStoreList?enterprise=${item.enterpriseId}`);
},
/**
* 分页---页码变化
......@@ -144,22 +165,59 @@ export default {
*/
getTableList(val) {
const that = this;
that.loading = true;
let para = {};
getRequest('/haoban-manage3-web/wx-enterprise-list', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.loading = false;
that.tableData = resData.result || [];
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.loading = false;
that.$message.error({
duration: 1000,
message: error.message
});
});
},
refreshStoreBind(item) {
const that = this;
that
.$confirm(`确认要刷新吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
that.loading = true;
let para = { enterpriseId: item.enterpriseId };
getRequest('/haoban-manage3-web/flush-bind-store-list', para)
.then(res => {
that.loading = false;
let resData = res.data;
if (resData.errorCode == 1) {
that.$message.success({
duration: 1000,
message: '刷新成功'
});
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.loading = false;
that.$message.error({
duration: 1000,
message: error.message
});
});
})
.catch(() => {});
}
},
watch: {
......@@ -181,8 +239,7 @@ export default {
document.documentElement.style.backgroundColor = '#fff';
},
components: {
navCrumb,
addEnterprise
navCrumb
}
};
</script>
......
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-08-19 17:13:01
-->
<template>
<div class="my-customer-wrap common-set-wrap">
<nav-crumb :navpath="navpath"> </nav-crumb>
<div class="right-content">
<div class="right-box" style="min-height: calc(100vh - 104px);">
<div class="apps-content flex" style="min-height: calc(100vh - 104px);">
<div class="apps-content-right">
<div class="overstore-tip m-b-19">
<div role="alert" class="el-alert el-alert--info flex flex-align-center w-604">
<i class="el-alert__icon el-icon-warning font-13 color-2f54eb"></i>
<div class="el-alert__content">
<p class="el-alert__title color-303133 font-13">授权范围:展示授权商户资源组全部授权范围,包含关联企业的门店和未关联企业的门店</p>
</div>
</div>
</div>
<div class="table-condition m-b-19">
<el-input placeholder="请输入门店名称" maxlength="50" v-model="pageParams.search" class="w-264 " style="width: 264px;" @keyup.native="toInput"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
</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-column prop="" label="门店 " show-overflow-tooltip>
<template slot-scope="scope">
<p class="gic-name color-606266">{{ scope.row.storeName || '' }}</p>
<p class="gic-version color-606266">{{ scope.row.storeCode || '' }}</p>
</template>
</el-table-column>
<el-table-column prop="" label="门店分组" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.storeGroupName || '' }}</template>
</el-table-column>
<el-table-column prop="" label="绑定时间" show-overflow-tooltip>
<template slot-scope="scope">
<div class="line-18 color-606266">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="line-18 color-606266">{{ scope.row.createTime | timeStampToHms }}</div>
</template>
</el-table-column>
</el-table>
<!-- <div class="block common-wrap__page text-right m-t-24" v-if="tableData.length != 0">
<dm-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[20, 40, 60, 80]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </dm-pagination>
</div> -->
</div>
</div>
</div>
</div>
</div>
<!-- <vue-gic-footer></vue-gic-footer> -->
</div>
</template>
<script>
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: 'authMerchant',
data() {
return {
bgHeight: window.screen.availHeight - 104 + 'px',
// 面包屑参数
navpath: [
{
name: '首页',
path: '/index'
},
{
name: '通讯录',
path: '/contactsList'
},
{
name: '授权商户',
path: '/authMerchant'
},
{
name: '门店绑定列表',
path: ''
}
],
pageParams: {
pageNum: 1,
pageSize: 20,
enterpriseId: this.$route.query.enterprise || ''
},
// 分页参数
total: 0,
tableData: [],
addShow: false
};
},
computed: {},
methods: {
toInput(res) {
const that = this;
that.pageParams.pageNum = 1;
that.getTableList();
},
/**
* 路由跳转
* @param {path} path
*/
changeRoute(path) {
this.$router.push(path);
},
/**
* 分页---页码变化
* @param {Number} val
*/
handleSizeChange(val) {
const that = this;
that.pageParams.pageNum = 1;
that.pageParams.pageSize = val;
that.getTableList();
},
/**
* 分页---当前页变化
* @param {Number} val
*/
handleCurrentChange(val) {
const that = this;
that.pageParams.pageNum = val;
that.getTableList();
},
/**
* 获取列表数据
*/
getTableList(val) {
const that = this;
let para = { ...this.pageParams };
getRequest('/haoban-manage3-web/bind-store-list', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1 && resData.result) {
that.tableData = resData.result.result || [];
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {},
mounted() {
const that = this;
that.getTableList();
document.documentElement.style.backgroundColor = '#f0f2f5';
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {
navCrumb
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.span-dot {
display: inline-block;
vertical-align: middle;
width: 6px;
height: 6px;
margin-right: 6px;
border-radius: 3px;
&.bg-52c41a {
background: #52c41a;
}
&.bg-f5222d {
background: #f5222d;
}
}
.bg-82C5FF {
background: #82c5ff;
}
.color-508CEE {
color: #508cee;
}
.color-FF585C {
color: #ff585c;
}
.line-h-18 {
line-height: 18px;
}
.m-b-19 {
margin-bottom: 19px;
}
.tooltip-text {
width: 100%;
white-space: pre-wrap;
word-break: break-all;
}
.w-293 {
width: 293px;
}
.w-191 {
width: 191px;
}
.w-604 {
width: 604px;
}
.el-alert--info {
background: rgba(240, 245, 255, 1);
border-radius: 2px;
border: 1px solid rgba(133, 165, 255, 1);
-webkit-box-align: flex-start;
-webkit-align-items: flex-start;
-ms-flex-align: flex-start;
align-items: flex-start;
.el-alert__icon {
font-size: 12px;
padding-top: 3px;
}
}
.my-customer-wrap {
height: 100%;
}
.right-content {
/*width: 100%;*/
padding: 0 20px 20px 20px;
min-height: calc(100% - 160px);
.right-box {
background: #fff;
min-height: 500px;
padding: 0px;
.apps-content {
.apps-content-right {
width: 100%;
padding: 20px;
background: #fff;
.overstore-body {
background: #fff;
}
.daily-set-wrap {
height: 100%;
background: #fff;
}
.app-detail-wrap {
height: 100%;
background: #fff;
}
.common-set-wrap {
height: 100%;
background: #fff;
}
}
}
}
}
.ul-li-cell {
.cell-img {
width: 40px;
min-width: 40px;
max-width: 40px;
height: 40px;
border-radius: 2px;
border: 1px solid rgba(228, 231, 237, 1);
box-sizing: border-box;
img {
width: 100%;
}
}
.cell-info {
padding-left: 10px;
box-sizing: border-box;
.cell-info-name {
max-width: 370px;
height: 20px;
line-height: 19px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.gic-name {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 14px;
color: #303133;
line-height: 18px;
}
.gic-version {
display: inline-block;
padding: 0 5px;
height: 15px;
line-height: 15px;
margin-left: 5px;
background: rgba(255, 241, 240, 1);
border-radius: 2px;
border: 1px solid rgba(255, 163, 158, 1);
font-size: 10px;
color: #f5222d;
}
}
}
</style>
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-05-14 16:14:12
-->
<template>
<div class="my-customer-wrap common-set-wrap salesleads-wrap">
<vue-office-header :projectName="projectName" @collapseTag="collapseTag" @toRouterView="toRouterView"> </vue-office-header>
<div class="enterprise-wrap__body">
<div id="content" class="content">
<nav-crumb :navpath="navpath"> </nav-crumb>
<div class="content-body">
<div class="right-content border-box">
<div class="right-box" style="min-height: calc(100vh - 86px);">
<div class="apps-content flex" style="min-height: calc(100vh - 86px);">
<div class="apps-content-left w-157" style="min-height: calc(100vh - 86px);">
<common-detail-left :tabListData="tabListData" :activeSelTab="activeSelTab" @setSelectTab="setSelectTab"></common-detail-left>
</div>
<div class="apps-content-right border-box">
<transition name="fade" mode="out-in">
<router-view :brandId="activeBrand" :activeGroupId="activeGroup" :tabType="activeTab" @showTab="showTab"></router-view>
</transition>
</div>
</div>
</div>
</div>
<!-- <vue-gic-footer></vue-gic-footer> -->
<!-- 公共组件 -->
</div>
</div>
</div>
</div>
</template>
<script>
import navCrumb from '@/components/nav/nav-app.vue';
import commonDetailLeft from '@/components/app/app-detail-left.vue';
import vueOfficeHeader from '@/components/vue-office-header';
export default {
name: 'salesleads',
data() {
return {
bgHeight: window.screen.availHeight - 288 + 'px',
activeSelTab: '1',
activeTab: '1',
navpath: [
{
name: '首页',
path: '/index'
},
{
name: '销售线索',
path: ''
}
],
tabListData: [
{
tabId: '0',
tabName: '销售线索记录',
icon: 'iconjichushezhi',
children: [
{
tabId: '1',
tabName: '门店视图'
},
{
tabId: '2',
tabName: '计划视图'
}
]
},
{
tabId: '3',
tabName: '销售线索设置',
icon: 'iconribaoshezhi'
}
]
};
},
computed: {},
methods: {
// 处理路由跳转
toRouterView(val) {
let that = this;
// 模拟检查数据
// //有两个参数
//{
// name:,
// path:
//}
that.$router.push({
path: val.path
});
},
/**
* 路由跳转
*/
changeRoute(path) {
this.$router.push(path);
},
/**
* 选择后返回tabId,做各路由判断
*/
setSelectTab(item) {
let that = this;
that.activeTab = item.tabId;
switch (item.tabId) {
case '0':
that.changeRoute(`/storeList`);
break;
case '1':
that.changeRoute(`/storeList`);
break;
case '2':
that.changeRoute(`/taskList`);
break;
case '3':
that.changeRoute(`/salesleadsSet`);
break;
}
},
/**
* 各路由返回 tabId
*/
showTab(id) {
let that = this;
that.activeTab = id;
that.activeSelTab = id;
that.tabListData.forEach(ele => {
if (ele.tabId == id) {
ele.onlyIconActive = false;
}
if (!!ele.children) {
ele.children.forEach(el => {
if (el.tabId == id) {
ele.onlyIconActive = true;
}
if (!!el.children) {
el.children.forEach(item => {
if (item.tabId == id) {
ele.onlyIconActive = true;
}
});
}
});
}
});
}
},
watch: {
$route: {
handler: function(val, oldVal) {},
// 深度观察监听
deep: true
},
activeBrand: function(newData, oldData) {
const that = this;
that.activeBrand = newData;
},
activeGroup: function(newData, oldData) {
const that = this;
that.activeGroup = newData;
}
},
mounted() {
// const that = this;
document.documentElement.style.backgroundColor = '#f0f2f5';
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {
navCrumb,
commonDetailLeft,
vueOfficeHeader
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.bg-82C5FF {
background: #82c5ff;
}
.color-508CEE {
color: #508cee;
}
.color-FF585C {
color: #ff585c;
}
.line-h-18 {
line-height: 18px;
}
.tooltip-text {
width: 100%;
white-space: pre-wrap;
word-break: break-all;
}
.my-customer-wrap {
height: 100%;
}
.content {
padding-top: 46px;
min-width: 1400px;
box-sizing: border-box;
}
.right-content {
/*width: 100%;*/
padding: 0 20px 20px;
min-height: calc(100% - 157px);
.right-box {
background: #fff;
min-height: 500px;
padding: 0px;
.apps-content {
.apps-content-left {
min-width: 157px;
height: 100%;
background: #fff;
overflow-x: hidden;
overflow-y: auto;
.apps-content-left__title {
height: 55px;
line-height: 55px;
padding: 0 0 0 18px;
}
.tab-left-list-cell {
position: relative;
text-align: left;
margin-top: 15px;
height: 30px;
line-height: 30px;
white-space: nowrap;
overflow: hidden;
cursor: pointer;
&:hover {
background: rgba(24, 144, 255, 0.06);
i {
color: #2f54eb;
}
}
&.active-tab {
background: rgba(24, 144, 255, 0.06);
&::before {
content: ' ';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 2px;
background: #2f54eb;
z-index: 1;
}
i {
color: #2f54eb;
}
}
.child-tab-left-list {
li {
position: relative;
text-align: left;
height: 30px;
line-height: 30px;
white-space: nowrap;
overflow: hidden;
cursor: pointer;
&:hover {
background: rgba(24, 144, 255, 0.06);
i {
color: #2f54eb;
}
}
&.active-tab {
background: rgba(24, 144, 255, 0.06);
&::before {
content: ' ';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 2px;
background: #2f54eb;
z-index: 1;
}
i {
color: #2f54eb;
}
}
}
}
}
}
.apps-content-right {
width: calc(100% - 157px);
padding-left: 10px;
background: #f0f2f5;
.daily-set-wrap {
height: 100%;
background: #fff;
}
.app-detail-wrap {
height: 100%;
background: #fff;
}
.common-set-wrap {
height: 100%;
background: #fff;
}
}
}
}
}
</style>
<style lang="scss">
.salesleads-wrap .enterprise-wrap__body .content .navwrap .my-customer-brand {
display: none !important;
}
</style>
<template>
<div class="my-customer-wrap common-set-wrap">
<div class="right-content">
<div class="flex">
<p class="m-r-11 font-14 color-606266">电话方式选择:</p>
<div>
<el-radio v-model="phoneTypes" label="1">
<div class="m-b-21" style="display:inline-block;vertical-align:top;">
<p class="l-h-1 m-b-5">公司电话</p>
<p class="tip">1.对接第三方呼叫中心,外呼显示第三方号码,可监控通话状态。费用结算及通话记录存储于GIC计费中心</p>
<p class="tip">2.若任务创建时无双向呼叫权限,此项设置勾选也不生效</p>
</div>
</el-radio>
<el-radio v-model="phoneTypes" label="2" class="m-b-24">
<div class="m-b-21" style="display:inline-block;vertical-align:top;">
<p class="l-h-1 m-b-5">私人电话</p>
<p class="tip">导购手机呼叫,无法监控通话状态。呼叫结算费用由导购手机自费</p>
</div>
</el-radio>
<p><el-button type="primary" @click="submitForm" :loading="loading">保存</el-button><span class="font-14 color-909399 m-l-12">保存后立即生效,历史数据不变,后续下达的任务按新设置运行</span></p>
</div>
</div>
</div>
<!-- <vue-gic-footer></vue-gic-footer> -->
</div>
</template>
<script>
import navCrumb from '@/components/nav/nav.vue';
import { postRequest } from '@/api/api';
import errMsg from '@/common/js/error';
export default {
name: 'authMerchant',
data() {
return {
bgHeight: window.screen.availHeight - 104 + 'px',
phoneTypes: '1',
loading: false
};
},
computed: {},
methods: {
/**
* 路由跳转
* @param {path} path
*/
changeRoute(path) {
this.$router.push(path);
},
submitForm() {
const that = this;
if (that.loading === true) {
return false;
}
that.loading = true;
let para = { ...that.formData };
postRequest('/haoban-web/market/clue/web/setting-update', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.loading = false;
return false;
}
that.loading = false;
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.loading = false;
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {},
mounted() {
document.documentElement.style.backgroundColor = '#f0f2f5';
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {
navCrumb
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.right-content {
padding: 33px 0 0 50px;
}
.el-radio {
display: block;
min-height: 22px;
}
.el-radio + .el-radio {
margin-left: 0;
}
.m-l-12 {
margin-left: 12px;
}
.m-r-11 {
margin-right: 11px;
}
.m-b-5 {
margin-bottom: 5px;
}
.m-b-21 {
margin-bottom: 21px;
}
.m-b-24 {
margin-bottom: 24px;
}
.font-14 {
font-size: 14px;
}
.l-h-1 {
line-height: 1;
}
.tip {
font-size: 12px;
color: #909399;
line-height: 22px;
}
</style>
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-08-26 10:05:42
-->
<template>
<div class="my-customer-wrap common-set-wrap">
<!-- <nav-crumb :navpath="navpath"> </nav-crumb> -->
<div class="right-content">
<div class="right-box" :style="{ 'min-height': bgHeight }">
<div class="apps-content flex" :style="{ 'min-height': bgHeight }">
<div class="apps-content-right">
<div class="overstore-body">
<div class="overstore-tip">
<div role="alert" class="el-alert el-alert--info flex flex-align-start ">
<i class="el-alert__icon el-icon-warning font-12 color-2f54eb"></i>
<div class="el-alert__content">
<span class="el-alert__title color-303133 font-13">仅展示近一年数据,数据截取时间:2020-12-31至2021-12-31</span>
</div>
</div>
<div role="tips" class="tips flex flex-align-start">
<i class="el-icon-warning-outline font-14 color-2f54eb"></i>
<div class="el-alert__content">
<span class="el-alert__title color-2f54eb font-13">查看指标说明</span>
</div>
</div>
</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-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-column label="计划名称" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.cluePlanName || '--' }}</template>
</el-table-column>
<el-table-column prop="" label="任务总数">
<template slot-scope="scope">{{ scope.row.taskCount || '--' }}</template>
</el-table-column>
<el-table-column prop="" label="已完成">
<template slot-scope="scope">{{ scope.row.finishCount || '--' }}</template>
</el-table-column>
<el-table-column prop="" label="完成率">
<template slot-scope="scope">{{ scope.row.completionRate + '%' || '--' }}</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>
</el-table-column>
<el-table-column prop="" label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="showDetail(scope.row)">查看详情</el-button>
</template>
</el-table-column>
</el-table>
<div class="block common-wrap__page text-right m-t-24" v-if="tableData.length != 0">
<dm-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[20, 40, 60, 80]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </dm-pagination>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <vue-gic-footer></vue-gic-footer> -->
</div>
</template>
<script>
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',
data() {
return {
bgHeight: window.screen.availHeight - 298 + 'px',
// 面包屑参数
navpath: [
{
name: '首页',
path: '/index'
},
{
name: '销售线索',
path: ''
}
],
pageParams: {
pageNum: 1,
pageSize: 20
},
// 分页参数
total: 0,
tableData: [
{
storeId: '12121',
storeName: '12',
taskCount: 111,
finishCount: 34,
completionRate: '12',
waitFinishCount: 77,
overdueCount: 23,
totalProfit: 3424123,
potentialProfit: 43242
}
],
pickerOptions: {
disabledDate: time => {
const end = new Date();
return time.getTime() < end.getTime() - 3600 * 1000 * 24 * 365 || time.getTime() > end.getTime();
}
}
};
},
computed: {},
methods: {
/**
* 路由跳转
*/
changeRoute(path) {
this.$router.push(path);
},
/**
* 筛选
*/
reFetch: _debounce(function(e, value) {
const that = this;
that.pageParams.pageNum = 1;
that.getTableList();
}, 500),
/**
* 分页---页码变化
* @param {Number} val
*/
handleSizeChange(val) {
const that = this;
that.pageParams.pageNum = 1;
that.pageParams.pageSize = val;
that.getTableList();
},
/**
* 分页---当前页变化
* @param {Number} val
*/
handleCurrentChange(val) {
const that = this;
that.pageParams.pageNum = val;
that.getTableList();
},
/**
* 获取列表数据
*/
getTableList(val) {
const that = this;
let para = { ...that.pageParams };
if (para.date) {
para.startTime = para.date[0];
para.endTime = para.date[1];
delete para.date;
}
getRequest('/haoban-manage3-web/store-full-list', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.tableData = resData.result.list || [];
that.total = resData.result.total;
} else {
errMsg.errorMsg(resData);
}
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
showDetail(item) {
this.$router.push(`taskDetail/${item.gicTaskId}`);
}
},
watch: {},
mounted() {
// const that = this;
// that.getTableList();
document.documentElement.style.backgroundColor = '#f0f2f5';
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {
navCrumb
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.bg-82C5FF {
background: #82c5ff;
}
.color-508CEE {
color: #508cee;
}
.color-FF585C {
color: #ff585c;
}
.line-h-18 {
line-height: 18px;
}
.tooltip-text {
width: 100%;
white-space: pre-wrap;
word-break: break-all;
}
.w-260 {
width: 260px;
}
.el-alert--info {
background: rgba(240, 245, 255, 1);
border-radius: 2px;
border: 1px solid rgba(133, 165, 255, 1);
-webkit-box-align: flex-start;
-webkit-align-items: flex-start;
-ms-flex-align: flex-start;
align-items: flex-start;
.el-alert__icon {
font-size: 12px;
}
}
.my-customer-wrap {
height: 100%;
}
.right-content {
/*width: 100%;*/
padding: 0;
min-height: calc(100% - 160px);
.right-box {
background: #fff;
min-height: 500px;
padding: 0px;
.apps-content {
.apps-content-right {
width: 100%;
padding: 20px;
background: #fff;
.overstore-body {
background: #fff;
.overstore-tip {
display: flex;
justify-content: flex-start;
align-items: center;
.el-alert--info {
align-items: center;
width: 444px;
height: 32px;
padding: 0 0 0 17px;
margin-right: 17px;
.el-alert__content {
padding-left: 0;
}
}
.tips {
cursor: pointer;
.el-alert__content {
padding: 0 3px;
}
}
}
}
.daily-set-wrap {
height: 100%;
background: #fff;
}
.app-detail-wrap {
height: 100%;
background: #fff;
}
.common-set-wrap {
height: 100%;
background: #fff;
}
}
}
}
}
</style>
......@@ -580,6 +580,10 @@ input:focus {
margin-right: 10px;
}
.m-r-19 {
margin-right: 19px;
}
.m-r-20 {
margin-right: 20px;
}
......@@ -664,6 +668,10 @@ input:focus {
line-height: 18px;
}
.line-22 {
line-height: 22px;
}
.w-80 {
width: 80px;
}
......@@ -696,6 +704,10 @@ input:focus {
width: 500px;
}
.w-718 {
width: 718px;
}
.el-input.w-500 {
width: 500px;
}
......
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