Merge branch 'master' into feature/20200514_version

# Conflicts:
#	vue.config.js
feature_0521
kevin jiang 6 years ago
commit 86798d3e7f

@ -37,8 +37,8 @@
.search-span {
font-size: 16px;
line-height: 32px;
margin-left: 20px;
margin-right: 20px;
margin-left: 10px;
margin-right: 10px;
}
.search-row{

@ -1,14 +1,14 @@
<template>
<div>
<Row :gutter="32">
<div >
<Row :gutter="32" >
<i-col span="32">
<row>
<row >
<!--筛选-->
<row>
<row class="div-content">
<span>
<span class="title-span">
<span class="date-btn" :style="dateBtnValue === '日' ? 'background: #2D8CF0;color: #fff' : ''"
@click="dateBtnClick('今日')"></span>
<span class="date-btn" :style="dateBtnValue === '日' ? 'background: #2D8CF0;color: #fff' : ''"
@click="dateBtnClick('昨日')"></span>
<span class="date-btn" :style="dateBtnValue === '本周' ? 'background: #2D8CF0;color: #fff' : ''"
@click="dateBtnClick('本周')">本周</span>
<span class="date-btn" :style="dateBtnValue === '本月' ? 'background: #2D8CF0;color: #fff' : ''"
@ -27,7 +27,6 @@
<DatePicker v-model="selectEndTime" type="date" placeholder="请选择时间"
class="date-picker" size="small" @on-change="diyDateChange"></DatePicker>
</span>
<img src="../../../static/img/bsd-logo.png" class="title-logo"/>
</span>
</row>
<!--柱状图-->
@ -68,7 +67,7 @@
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
//
spinShow: false,
dateBtnValue: "日",
dateBtnValue: "日",
viewDate: this.$moment(new Date()).format("YYYY-MM-DD"),
//
recentName: "近七天",
@ -174,8 +173,7 @@
}
},
mounted: function () {
this.dateBtnClick('今日');
this.timingRefresh();
this.dateBtnClick('昨日');
},
methods: {
//
@ -187,10 +185,10 @@
//
dateBtnClick: function (value) {
switch (value) {
case '日':
this.dateBtnValue = "日";
case '日':
this.dateBtnValue = "日";
this.recentName = "近七天";
this.dateSelectChange('日');
this.dateSelectChange('日');
this.chartExtend.barWidth = 28;
this.chartExtend.label.show = true;
break;
@ -226,22 +224,30 @@
//text
let nowDate = this.$moment(new Date());
switch (value) {
case '日':
this.viewDate = nowDate.format("YYYY-MM-DD");
this.selectStartTime = this.$moment(new Date()).format("YYYY-MM-DD 00:00:00");
this.selectEndTime = this.$moment(new Date()).format("YYYY-MM-DD HH:mm:ss");
this.startTime = this.$moment(new Date()).add(-6, "days").format("YYYY-MM-DD 00:00:00");
this.endTime = this.$moment(new Date()).format("YYYY-MM-DD HH:mm:ss");
case '日':
this.viewDate = nowDate.add(-1, "days").format("YYYY-MM-DD");
this.selectStartTime = this.$moment(new Date()).add(-1, "days").format("YYYY-MM-DD 00:00:00");
this.selectEndTime = this.$moment(new Date()).add(-1, "days").format("YYYY-MM-DD HH:mm:ss");
this.startTime = this.$moment(new Date()).add(-7, "days").format("YYYY-MM-DD 00:00:00");
this.endTime = this.$moment(new Date()).add(-1, "days").format("YYYY-MM-DD HH:mm:ss");
break;
case '本周':
this.viewDate = nowDate.startOf('week').format("YYYY-MM-DD") + ' 至 ' + this.$moment(new Date()).format("YYYY-MM-DD");
if (nowDate.startOf('week').format("YYYY-MM-DD") === this.$moment(new Date()).format("YYYY-MM-DD")){
this.viewDate = nowDate.startOf('week').format("YYYY-MM-DD") + ' 至 ' + this.$moment(new Date()).format("YYYY-MM-DD");
}else{
this.viewDate = nowDate.startOf('week').format("YYYY-MM-DD") + ' 至 ' + this.$moment(new Date()).add(-1, "days").format("YYYY-MM-DD");
}
this.selectStartTime = this.$moment(new Date()).startOf("week").format("YYYY-MM-DD 00:00:00");
this.selectEndTime = this.$moment(new Date()).format("YYYY-MM-DD HH:mm:ss");
this.startTime = this.selectStartTime;
this.endTime = this.$moment(new Date()).endOf("week").format("YYYY-MM-DD HH:mm:ss");
break;
case '本月':
this.viewDate = nowDate.startOf('month').format("YYYY-MM-DD") + ' 至 ' + this.$moment(new Date()).format("YYYY-MM-DD");
if (nowDate.startOf('month').format("YYYY-MM-DD") === this.$moment(new Date()).format("YYYY-MM-DD")){
this.viewDate = nowDate.startOf('month').format("YYYY-MM-DD") + ' 至 ' + this.$moment(new Date()).format("YYYY-MM-DD");
}else{
this.viewDate = nowDate.startOf('month').format("YYYY-MM-DD") + ' 至 ' + this.$moment(new Date()).add(-1, "days").format("YYYY-MM-DD");
}
this.selectStartTime = this.$moment(new Date()).startOf("month").format("YYYY-MM-DD 00:00:00");
this.selectEndTime = this.$moment(new Date()).format("YYYY-MM-DD HH:mm:ss");
this.startTime = this.selectStartTime;
@ -383,4 +389,9 @@
font-weight: bold;
color:#666666;
}
.div-content{
margin-top: 20px;
margin-bottom: 20px;
}
</style>

@ -4,11 +4,11 @@
<i-col span="32">
<row>
<!--筛选-->
<row>
<row class="div-content">
<span>
<span class="title-span">
<span class="date-btn" :style="dateBtnValue === '日' ? 'background: #2D8CF0;color: #fff' : ''"
@click="dateBtnClick('今日')"></span>
<span class="date-btn" :style="dateBtnValue === '日' ? 'background: #2D8CF0;color: #fff' : ''"
@click="dateBtnClick('昨日')"></span>
<span class="date-btn" :style="dateBtnValue === '本周' ? 'background: #2D8CF0;color: #fff' : ''"
@click="dateBtnClick('本周')">本周</span>
<span class="date-btn" :style="dateBtnValue === '本月' ? 'background: #2D8CF0;color: #fff' : ''"
@ -27,7 +27,6 @@
<DatePicker v-model="selectEndTime" type="date" placeholder="请选择时间"
class="date-picker" size="small" @on-change="diyDateChange"></DatePicker>
</span>
<img src="../../../static/img/bsd-logo.png" class="title-logo"/>
</span>
</row>
<!--柱状图-->
@ -36,7 +35,7 @@
<span class="blue-logo"></span>
<span class="chart-title-date">累计拓客报表</span>
<span style="font-size: 14px;color:#666;margin-left: 100px">
拓客<input-number size="small" :min="1" v-model="count"></input-number>以内门店数
拓客<InputNumber size="small" :min="1" v-model="count" @on-change="getMainList"></InputNumber>
</span>
<ve-histogram :data="chartData" :extend="chartExtend" :settings="chartSettings" :colors="chartColor"></ve-histogram>
</i-col>
@ -59,8 +58,8 @@
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
//
spinShow: false,
count: 3,
dateBtnValue: "日",
count: 10,
dateBtnValue: "日",
viewDate: this.$moment(new Date()).format("YYYY-MM-DD"),
//
recentName: "近七天",
@ -141,8 +140,7 @@
}
},
mounted: function () {
this.dateBtnClick('今日');
this.timingRefresh();
this.dateBtnClick('昨日');
},
methods: {
//
@ -154,10 +152,10 @@
//
dateBtnClick: function (value) {
switch (value) {
case '日':
this.dateBtnValue = "日";
case '日':
this.dateBtnValue = "日";
this.recentName = "近七天";
this.dateSelectChange('日');
this.dateSelectChange('日');
this.chartExtend.barWidth = 28;
this.chartExtend.label.show = true;
break;
@ -185,6 +183,7 @@
//
diyDateChange: function () {
if (this.selectStartTime && this.selectEndTime) {
//15
this.dateSelectChange('自定义');
}
},
@ -193,23 +192,29 @@
//text
let nowDate = this.$moment(new Date());
switch (value) {
case '日':
this.viewDate = nowDate.format("YYYY-MM-DD");
this.selectStartTime = this.$moment(new Date()).format("YYYY-MM-DD 00:00:00");
this.selectEndTime = this.$moment(new Date()).format("YYYY-MM-DD HH:mm:ss");
this.startTime = this.$moment(new Date()).add(-6, "days").format("YYYY-MM-DD 00:00:00");
this.endTime = this.$moment(new Date()).format("YYYY-MM-DD HH:mm:ss");
case '日':
this.viewDate = nowDate.add(-1, "days").format("YYYY-MM-DD");
this.selectStartTime = this.$moment(new Date()).add(-1, "days").format("YYYY-MM-DD 00:00:00");
this.selectEndTime = this.$moment(new Date()).add(-1, "days").format("YYYY-MM-DD HH:mm:ss");
this.startTime = this.$moment(new Date()).add(-7, "days").format("YYYY-MM-DD 00:00:00");
this.endTime = this.$moment(new Date()).add(-1, "days").format("YYYY-MM-DD HH:mm:ss");
break;
case '本周':
this.viewDate = nowDate.startOf('week').format("YYYY-MM-DD") + ' 至 ' + this.$moment(new Date()).format("YYYY-MM-DD");
this.selectStartTime = this.$moment(new Date()).startOf("week").format("YYYY-MM-DD 00:00:00");
if (nowDate.startOf('week').format("YYYY-MM-DD") === this.$moment(new Date()).format("YYYY-MM-DD")){
this.viewDate = nowDate.startOf('week').format("YYYY-MM-DD") + ' 至 ' + this.$moment(new Date()).format("YYYY-MM-DD");
}else{
this.viewDate = nowDate.startOf('week').format("YYYY-MM-DD") + ' 至 ' + this.$moment(new Date()).add(-1, "days").format("YYYY-MM-DD");
} this.selectStartTime = this.$moment(new Date()).startOf("week").format("YYYY-MM-DD 00:00:00");
this.selectEndTime = this.$moment(new Date()).format("YYYY-MM-DD HH:mm:ss");
this.startTime = this.selectStartTime;
this.endTime = this.$moment(new Date()).endOf("week").format("YYYY-MM-DD HH:mm:ss");
break;
case '本月':
this.viewDate = nowDate.startOf('month').format("YYYY-MM-DD") + ' 至 ' + this.$moment(new Date()).format("YYYY-MM-DD");
this.selectStartTime = this.$moment(new Date()).startOf("month").format("YYYY-MM-DD 00:00:00");
if (nowDate.startOf('month').format("YYYY-MM-DD") === this.$moment(new Date()).format("YYYY-MM-DD")){
this.viewDate = nowDate.startOf('month').format("YYYY-MM-DD") + ' 至 ' + this.$moment(new Date()).format("YYYY-MM-DD");
}else{
this.viewDate = nowDate.startOf('month').format("YYYY-MM-DD") + ' 至 ' + this.$moment(new Date()).add(-1, "days").format("YYYY-MM-DD");
} this.selectStartTime = this.$moment(new Date()).startOf("month").format("YYYY-MM-DD 00:00:00");
this.selectEndTime = this.$moment(new Date()).format("YYYY-MM-DD HH:mm:ss");
this.startTime = this.selectStartTime;
this.endTime = this.$moment(new Date()).endOf("month").format("YYYY-MM-DD HH:mm:ss");
@ -340,4 +345,9 @@
font-weight: bold;
color:#666666;
}
.div-content{
margin-top: 20px;
margin-bottom: 20px;
}
</style>

@ -11,17 +11,17 @@
<span class="left-15 txt-font-a">零售公司</span>
<Select v-model="companyId" filterable class="left-15 txt-font-a search-select"
@on-change="companySelect">
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
<Option v-for="(item,index) in companyList" :value="item.id" :key="1+index+item.id">{{ item.name }}</Option>
</Select>
<span class="left-15 txt-font-a">店铺</span>
<Select filterable placeholder="全部" v-model="shopId" class="left-15 txt-font-a search-select"
@on-change="downShopChange">
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.name }}</Option>
<Option v-for="(item,index) in shopList" :value="item.id" :key="2+index+item.id">{{ item.name }}</Option>
</Select>
<span class="left-15 txt-font-a">导购</span>
<Select filterable placeholder="全部" v-model="sellerId" class="left-15 txt-font-a search-select"
>
<Option v-for="item in sellerList" :value="item.staffId" :key="item.id">{{ item.name }}
<Option v-for="(item,index) in sellerList" :value="item.staffId" :key="3+index+item.id">{{ item.name }}
</Option>
</Select>
@ -248,6 +248,8 @@
}
},
mounted: function () {
this.dateRange[0] = this.$moment().format("YYYY-MM-DD");
this.dateRange[1] = this.$moment().format("YYYY-MM-DD");
this.getCustomerData();
this.getSelectList();
this.downSellerData();

@ -0,0 +1,341 @@
<template>
<div>
<Row :gutter="32">
<i-col span="32">
<row>
<row class="search-row">
<span class="left-15">选择日期</span>
<DatePicker v-model="dateRange" class="left-15 date-picker" type="daterange"
placement="bottom-start"
split-panels placeholder="请选择日期区间"></DatePicker>
<span class="left-15 txt-font-a">零售公司</span>
<Select v-model="companyId" filterable class="left-15 txt-font-a search-select"
@on-change="companySelect">
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
<span class="left-15 txt-font-a">店铺</span>
<Select filterable placeholder="全部" v-model="shopId" class="left-15 txt-font-a search-select"
@on-change="downShopChange">
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
<Button type="primary" @click="searchCustomerDataBtnClick"
class="txt-font-a search-btn">查询
</Button>
<Button type="primary" @click="exportData"
class="txt-font-a search-btn">导出数据
</Button>
</row>
<row>
<Table ref="table" :loading="loading" :columns="columns1" :data="data1" style="margin-top: 20px;" size="small"
no-data-text="--"></Table>
</row>
<Page :total="totalSize" :current="pageNum" :page-size="pageSize" show-elevator show-total
placement="top" @on-change="handlePage" class-name="ks-page"></Page>
</row>
</i-col>
</Row>
</div>
</template>
<script>
import customerDetail from "../../services/datacenter/DataCenter";
import zeroExtend from "../../services/customer/zeroExtend";
import staff from "../../services/staff/staff";
export default {
inject: ['checkParamBlank'],
data() {
return {
loading: false,
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
//
totalSize: null,
pageNum: 1,
pageSize: 10,
startDate: null,
endDate: null,
customerName: null,
dateRange: [],
customerList: [],
companyList: [],
companyId: 0,
organizationalList: [],
shopId: null,
shopList: [],
customerData: {},
columns1: [
{
title: '序号',
key: 'number'
},
{
title: '店铺',
key: 'storeName'
},
{
title: '店铺编号',
key: 'storeCode'
},
{
title: '所属零售公司',
key: 'companyName'
},
{
title: '新增客户数',
key: 'newContactCnt'
},
{
title: '聊天总数',
key: 'chatCnt'
},
{
title: '发消息数',
key: 'messageCnt'
},
{
title: '已回复聊天占比',
key: 'replyPercentage'
},
{
title: '平均回复时长',
key: 'avgReplyTime'
},
{
title: '删除/拉黑成员客户数',
key: 'negativeFeedbackCnt'
}
],
data1: [
]
}
},
mounted: function () {
this.getStorerData();
this.getSelectList();
this.downShopData();
},
methods: {
/**基础数据区域list、零售公司list、好友list*/
getSelectList: function () {
let that = this;
let request = {
userId: this.userId,
};
zeroExtend.getSelectListRequest(request, function (data) {
if (data.data.code !== "0000") {
that.$Message.error("系统异常");
}
data = data.data.results;
if (data) {
that.organizationalList = data;
that.companyList = that.organizationalList.filter(item => item.level === 2);
}
//
that.insertAllOption();
});
},
searchCustomerDataBtnClick: function () {
this.totalSize = null;
this.getStorerData();
},
exportData() {
let that = this;
this.loading = true;
that.data1 = [];
let stdate = null;
let eddate = null;
if (that.dateRange[0]) {
stdate = this.$moment(that.dateRange[0]).format("YYYY-MM-DD");
eddate = this.$moment(that.dateRange[1]).format("YYYY-MM-DD");
}
let request =
{
userId: that.userId,
startDate: stdate,
endDate: eddate,
companyId: that.changeData(that.companyId),
shopId: that.changeData(that.shopId),
};
customerDetail.downloadstoreDataDetailExcel(request, null);
},
getStorerData: function () {
let that = this;
this.loading = true;
that.data1 = [];
let stdate = null;
let eddate = null;
if (that.dateRange[0]) {
stdate = this.$moment(that.dateRange[0]).format("YYYY-MM-DD");
eddate = this.$moment(that.dateRange[1]).format("YYYY-MM-DD");
}
let request =
{
userId: that.userId,
startDate: stdate,
endDate: eddate,
companyId: that.changeData(that.companyId),
shopId: that.changeData(that.shopId),
pageNum: that.pageNum,
pageSize: that.pageSize,
};
customerDetail.storeDataDetail(request, function (data) {
that.data1 = [];
that.loading = false;
data = data.data.results;
if (data) {
that.totalSize = data.total;
for (let i = 0; i < data.list.length; i++) {
let entity = data.list[i];
if (entity) {
that.data1.push(entity);
}
}
}
}, function () {
that.loading = false;
});
},
//
insertAllOption: function () {
if (this.companyList.length === 0 || this.companyList[0].id !== 0) {
this.companyList.splice(0, 0, {"id": 0, "name": "全部"});
}
if (this.shopList.length === 0 || this.shopList[0].id !== 0) {
this.shopList.splice(0, 0, {"id": 0, "name": "全部"});
}
},
downShopData: function (selected) {
let that = this;
let companyId = selected;
if (!selected) {
companyId = that.companyId;
}
let customerIds = [];
this.customerList = [];
if (companyId === 0) {
//
} else {
this.customerList = this.organizationalList.filter(item => item.parentId === companyId && item.level === 3);
this.insertAllOption();
}
customerIds = this.customerList.map(item => item.id);
let request =
{userId: that.userId, customerIds: JSON.stringify(customerIds)};
staff.downShopData(request, function (data) {
data = data.data.results;
if (data) {
that.shopList = [{"id": 0, "name": "全部"}];
for (let i = 0; i < data.length; i++) {
let entity = data[i];
if (entity) {
that.shopList.push(entity);
}
}
}
})
},
//
companySelect: function () {
//
this.downShopData(this.companyId);
this.selectedStore = 0;
let that = this;
that.downSellerData();
},
downShopChange: function () {
let that = this;
that.downSellerData();
},
changeData: function (value) {
if (value == 0) {
return null;
}
return value;
},
//
handlePage: function (value) {
this.pageNum = value;
this.getStorerData();
},
// /**mainList*/
// getMainList: function(){
//
// },
// //
// handlePage:function (value) {
//
// },
},
computed: {
options1() {
let that = this;
return {
disabledDate(date) {
if (that.endDate == null || that.endDate == "") {
return false;
} else {
return date && date.valueOf() > that.endDate;
}
}
}
},
options2() {
let that = this;
return {
disabledDate(date) {
if (that.startDate == null || that.startDate == "") {
return false;
} else {
return date && date.valueOf() < that.startDate;
}
}
}
},
}
}
</script>
<style scoped>
.left-15 {
margin-left: 15px;
}
.txt-font-a {
font-size: 16px;
}
.search-row {
height: 90px;
background: #f7f8fa;
border: 1px solid #E8ECF2;
line-height: 90px;
}
.date-picker {
width: 240px;
}
.search-select {
width: 190px;
}
.search-btn{
margin-left: 20px;
}
</style>

@ -117,7 +117,7 @@
</row>
<!--前十名-->
<row class="top-10">
<i-col span="8">
<i-col span="6">
<row class="outline chart-top-10-row">
<span class="blue-logo"></span>
<span class="chart-top-10-title-span">零售公司店均新增好友top10</span>
@ -136,7 +136,7 @@
</row>
</i-col>
<i-col span="8" class="padding-left-10">
<i-col span="10" class="padding-left-10">
<row class="outline chart-top-10-row">
<span class="blue-logo"></span>
<span class="chart-top-10-title-span">店铺新增好友top10</span>
@ -408,7 +408,9 @@
},
getAllCount: function(){
let that = this;
customerView.getAllCount(null,function (data) {
customerView.getAllCount({
userId: this.userId
},function (data) {
if (data.data.code !== "0000") {
that.$Message.error("系统异常");
}
@ -515,9 +517,9 @@
//
timingRefresh: function () {
let that = this;
that.timer = setInterval(function () {
that.dateBtnClick(that.dateBtnValue);
}, 1000 * 60 * 5);
// that.timer = setInterval(function () {
// that.dateBtnClick(that.dateBtnValue);
// }, 1000 * 60 * 5);
}
}

@ -11,7 +11,8 @@
<span class="search-span">零售公司</span>
<Select v-model="selectedCompany" filterable class="search-select">
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
<Option v-for="item in companyList" :value="item.id" :key="'gs' + item.id">{{item.name }}
</Option>
</Select>
<Button type="primary" @click="generalizeOfRetail" class="search-btn">查询</Button>
<div class="search-div-btn">
@ -130,6 +131,10 @@
{
title: '拉黑率(累计)',
key: 'delRate'
},
{
title: '店均拓客数',
key: 'avgStoreCustomer'
}
],
data1: [],
@ -142,7 +147,7 @@
}
},
mounted: function () {
let startDate = this.$moment(new Date()).add(-29, "day").format("YYYY-MM-DD");
let startDate = this.$moment(new Date()).add(-6, "day").format("YYYY-MM-DD");
let endDate = this.$moment(new Date()).format("YYYY-MM-DD");
this.selectDate.push(startDate);
this.selectDate.push(endDate);
@ -254,9 +259,9 @@
let title = "零售公司推广情况" + that.selectDate[0] + '-' + that.selectDate[1];
require.ensure([], () => {
const {export_json_to_excel} = require('../../excel/Export2Excel');
const tHeader = ['序号', '零售公司名称', '总好友数', '总好友数(去重)', '新增好友数', '新增好友数(去重)', '日增好友平均', '日增好友平均(去重)', '删除/拉黑成员客户数(累计)', '拉黑率(累计)'];
const tHeader = ['序号', '零售公司名称', '总好友数', '总好友数(去重)', '新增好友数', '新增好友数(去重)', '日增好友平均', '日增好友平均(去重)', '删除/拉黑成员客户数(累计)', '拉黑率(累计)', '店均拓客数'];
//
const filterVal = ['index', 'retailCompany', 'allCustomer', 'effectiveCustomer', 'newCustomer', 'newEffectiveCustomer', 'avgNewCustomer', 'avgNewEffectiveCustomer', 'delCustomer', 'delRate'];
const filterVal = ['index', 'retailCompany', 'allCustomer', 'effectiveCustomer', 'newCustomer', 'newEffectiveCustomer', 'avgNewCustomer', 'avgNewEffectiveCustomer', 'delCustomer', 'delRate', 'avgStoreCustomer'];
//
//datatableDatalist
const data = that.formatJson(filterVal, originAllData);
@ -278,7 +283,7 @@
<style scoped>
.search-btn{
.search-btn {
margin-left: 40px;
}
</style>

@ -4,20 +4,24 @@
<i-col span="24" class="search-col">
<Row class="row-style">
<span class="search-span">选择日期</span>
<DatePicker @on-change="onChangeDateLister" :value="selectDate" type="daterange" split-panels
<DatePicker :option="dateOption" @on-change="onChangeDateLister" :value="selectDate"
type="daterange" split-panels
placeholder="请选择日期" class="date-picker"></DatePicker>
<span class="search-span">零售公司</span>
<Select v-model="selectedCompany" @on-change="storeOfCompany" filterable class="search-select">
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
<Option v-for="item in companyList" :value="item.id" :key="'gs' + item.id">{{ item.name }}
</Option>
</Select>
<span class="search-span">店铺</span>
<Select v-model="selectedStore" filterable @on-change="sellerOfStore" class="search-select">
<Option v-for="item in storeList" :value="item.id" :key="item.id">{{ item.name }}</Option>
<Select v-model="selectedStore" filterable @on-change="sellerOfStore" class="search-select">
<Option v-for="item in storeList" :value="item.id" :key="'dp' + item.id">{{ item.name }}
</Option>
</Select>
<span class="search-span">导购</span>
<Select v-model="selectedStaff" filterable class="search-select">
<Option v-for="item in staffList" :value="item.id" :key="item.id">{{ item.name }}</Option>
<Option v-for="item in staffList" :value="item.id" :key="'dg' + item.id">{{ item.name }}
</Option>
</Select>
<Button type="primary" @click="generalizeOfSeller" class="search-btn">查询</Button>
@ -43,6 +47,11 @@
name: "IncreaseDataStaff",
data() {
return {
dateOption: {
disabledDate(date) {
return date && date.valueOf() < Date.now();
}
},
selectedCompany: null,
companyList: [],
selectedStore: null,

@ -8,11 +8,13 @@
placeholder="请选择日期" class="date-picker"></DatePicker>
<span class="search-span">零售公司</span>
<Select v-model="selectedCompany" filterable class="search-select" @on-change="storeOfCompany">
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
<Option v-for="item in companyList" :value="item.id" :key="'gs' + item.id">{{ item.name }}
</Option>
</Select>
<span class="search-span">店铺</span>
<Select v-model="selectedStore" filterable class="search-select">
<Option v-for="item in storeList" :value="item.id" :key="item.id">{{ item.name }}</Option>
<Option v-for="item in storeList" :value="item.id" :key="'dp' + item.id">{{ item.name }}
</Option>
</Select>
<Button type="primary" @click="generalizeOfStore" class="search-btn">查询</Button>
@ -111,6 +113,9 @@
this.selectDate.push(endDate);
this.allCompany();
this.storeInit();
this.pageNum = 1;
this.generalizeOfStore();
},
methods: {
@ -190,7 +195,6 @@
},
generalizeOfStore() {
this.pageNum = 1;
this.tableLoading = true;
if (this.selectDate[0] === "") {
this.$Message.info("请选择日期");

@ -209,6 +209,10 @@
staffCode: [
{required: true, message: '工号不能为空', trigger: 'blur'}
],
phone: [
{required: true, message: '手机号码不能为空', trigger: 'blur'},
{pattern: /^1[3456789]\d{9}$/, message: "手机号码格式不正确", trigger: "blur"}
],
// mail: [
// { required: true, message: '', trigger: 'blur' },
// { type: 'email', message: '', trigger: 'blur' }

@ -3,7 +3,7 @@
<Row class="search-row">
<i-col span="24" class="search-col">
<Row class="row-style">
<i-input placeholder="店铺名称或编码" class="search-select" v-model="searchShop"/>
<i-input placeholder="店铺名称或编码" class="search-select" :on-enter="searchCustomerDataBtnClick" v-model="searchShop"/>
<span class="search-span">大区</span>
<Select v-model="regionId" filterable class="search-select" @on-change="regionSelect">
<Option v-for="(item,index) in regionList" :value="item.id" :key=" index + item.id">{{ item.name }}</Option>
@ -19,7 +19,7 @@
<Button type="primary" @click="searchCustomerDataBtnClick" class="search-btn">查询</Button>
<Button type="primary" @click="downloadStoreCode" style="margin-left: 20px;">批量下载门店码</Button>
<Button type="primary" @click="downloadStoreSellerCode" style="margin-left: 20px;">批量下载导购码</Button>
<!--<Button type="primary" @click="open()" style="margin-right: 10px;">开通门店</Button>-->
<Button type="primary" @click="isShowImport = true" style="margin-right: 10px;">批量导入账</Button>
<Button type="primary" @click="OnClickListerDownloadData" style="margin-left: 20px;">导出</Button>
</Row>
@ -31,10 +31,10 @@
<img :src="require('../../../static/img/qrCode-init.png')" @click="show(row)"
class="table-img-qr-code"/>
</template>
<router-link slot-scope="{row}" slot="action"
:to="{path:'/shop/increase/manager/staff',query:{storeId:row.id}}">
<Button ghost class="router-btn"> 门店导购管理</Button>
</router-link>
<template slot-scope="{row}" slot="action">
<Button ghost class="router-btn" @click="open(row)"></Button>
<Button ghost class="router-btn" :to="{path:'/shop/increase/manager/staff',query:{storeId:row.id}}"> 门店导购管理</Button>
</template>
</Table>
<!-- 预览二维码 -->
@ -63,60 +63,23 @@
<div slot="header">开通企业微信号</div>
<Form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="80">
<FormItem label="名称" prop="name">
<i-input type="text" v-model="formValidate.name" placeholder="请输入名字"></i-input>
<FormItem label="名称" prop="cpUserName">
<i-input type="text" v-model="formValidate.cpUserName" placeholder="请输入名字"></i-input>
</FormItem>
<FormItem label="别名" prop="alias">
<i-input v-model="formValidate.alias" placeholder="请输入别名"></i-input>
</FormItem>
<FormItem label="账号" prop="userId">
<i-input v-model="formValidate.userId" placeholder="请输入账号"></i-input>
<i-input v-model="formValidate.cpUserId" :disabled="true"></i-input>
</FormItem>
<FormItem label="手机" prop="mobile">
<i-input v-model="formValidate.mobile" placeholder="成员通过验证该手机号后可加入企业">
<Select v-model="formValidate.selectedPhoneRegion" slot="prepend" style="width: 80px">
<Option v-for="item in prefixDefault" :key="item.prefix + item.en" :value="item.prefix">
{{item.prefix}}
</Option>
</Select>
</i-input>
</FormItem>
<FormItem label="邮箱" prop="mail">
<i-input v-model="formValidate.email" placeholder="请输入邮箱"></i-input>
</FormItem>
<FormItem label="地址" prop="address">
<i-input v-model="formValidate.address" placeholder="请输入地址"></i-input>
</FormItem>
<FormItem label="零售公司" prop="departIds">
<Select v-model="formValidate.departIds" placeholder="选择零售公司"
@on-change="downCompanyChange(formValidate)">
<Option v-for="item in regionList" :value="item.id" :key="item.id">{{item.name}}</Option>
</Select>
<i-input v-model="formValidate.mobile" placeholder="请输入手机"></i-input>
</FormItem>
<FormItem label="店铺" prop="storeId">
<Select v-model="formValidate.storeId" placeholder="选择店铺">
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{item.name}}</Option>
</Select>
<i-input v-model="formValidate.shopName" :disabled="true"></i-input>
</FormItem>
<!--
<FormItem label="职务" prop="position">
<i-input v-model="formValidate.position" placeholder="请输入职务"></i-input>
</FormItem>
-->
<!--<FormItem label="身份" prop="position">
<i-input v-model="formValidate.position" placeholder="请输入身份"></i-input>
</FormItem>-->
<FormItem label="">
<CheckboxGroup v-model="formValidate.checkbox">
<Checkbox label="vail">通过邮箱或短信发送企业邀请</Checkbox>
</CheckboxGroup>
</FormItem>
<FormItem style="text-align: left;">
<Button type="primary" @click="handleSubmit(formValidate)"></Button>
<Button type="primary" @click="handleSubmit(formValidate)"></Button>
<Button @click="handleReset('formValidate')" style="margin-left: 8px">取消</Button>
</FormItem>
</Form>
@ -185,7 +148,7 @@
isShowError: false,
isShowAdd: false,
showStoreName: '',
updateUrl: http.getBaseUrl() + "/store/emp/import",
updateUrl: http.getBaseUrl() + "/store/emp/staff/import",
downLoadStoreCodeUrl: http.getBaseUrl() + "/store/emp/download/store/code",
qrCodeImage: '',
selectedRegion: 0,
@ -199,7 +162,6 @@
companyList: [],
customerList: [],
companyId: 0,
errorList: [],
selectedStore: 0,
shopList: [],
@ -261,72 +223,23 @@
slot: 'action'
}
],
data1: [
/* {
id: 1,
storeName: '店铺1',
storeWx: 'D1',
staffNum: 10,
customerNum: 999
},
{
id: 2,
storeName: '店铺2',
storeWx: 'D2',
staffNum: 10,
customerNum: 999
},
{
id: 3,
storeName: '店铺3',
storeWx: 'D3',
staffNum: 10,
customerNum: 999
},
{
id: 4,
storeName: '店铺4',
storeWx: 'D4',
staffNum: 10,
customerNum: 999
}*/
],
//
data1: [],
formValidate: {
alias: '',
userId: '',
gender: '',
id: '',
cpUserId: '',
mobile: '',
email: '',
address: '',
departIds: '',
selectedPhoneRegion: '86',
duty: '',
position: '',
interest: [],
desc: '',
checkbox: ['vail'],
storeId: '',
cpUserName: '',
shopName: ''
},
ruleValidate: {
userId: [
{required: true, message: '账号不能为空', trigger: 'blur'}
],
// gender: [
// { required: true, message: '', trigger: 'change' }
// ],
mobile: [
{required: true, message: '手机号码不能为空', trigger: 'blur'}
],
// mail: [
// { required: true, message: '', trigger: 'blur' },
// { type: 'email', message: '', trigger: 'blur' }
// ],
departIds: [
{required: true, message: '请选择部门', trigger: 'change'}
],
storeId: [
{required: true, message: '请选择部门', trigger: 'change'},
cpUserName: [
{required: true, message: '名称不能为空', trigger: 'blur'}
]
}
}
@ -335,8 +248,6 @@
this.setMenuName("门店推广", "推广管理");
this.listOfStore();
this.getSelectList();
// this.downBigRegionData();
// this.downRegionData();
this.downShopData();
},
methods: {
@ -379,19 +290,14 @@
that.loading = false;
});
},
addStoreWX: function (request) {
modifyStoreWX: function (request) {
let that = this;
http.addStoreWX(request, function (data) {
http.modifyStoreWX(request, function (data) {
data = data.data;
if (data.code == "0000") {
if (data.results.indexOf("8888") != -1) {
let str = data.results.split(",");
that.$Message.success('该企业微信已被 【' + str[1] + '】绑定 请从新绑定微信号');
} else {
that.$Message.success('添加成功!');
that.listOfStore();
this.handleAdd(this.formValidate);
}
that.$Message.success('修改成功!');
that.listOfStore();
this.handleAdd(this.formValidate);
}
})
},
@ -442,7 +348,9 @@
this.downShopData();
},
//
companySelect: function () {
companySelect: function (value) {
this.companyId = value;
//
this.downShopData(this.companyId);
this.selectedStore = 0;
@ -526,9 +434,19 @@
cancel: function () {
this.isShow = false;
},
open: function () {
open: function (item) {
this.isShowAdd = true;
this.formValidate = {
alias: item.alias,
cpUserName: item.cpUserName,
cpUserId: item.cpUserId,
id: item.userId,
mobile: item.mobile,
checkbox: ['vail'],
storeId: item.id,
shopName: item.name
}
},
remove: function () {
@ -537,10 +455,10 @@
this.isShowImport = true;
this.isShowError = false
},
handleSubmit(name) {
if (name) {
handleSubmit(value) {
if (value) {
//
this.addStoreWX(name);
this.modifyStoreWX(value);
} else {
this.$Message.error('Fail!');
}
@ -550,7 +468,7 @@
this.isShowAdd = false;
},
downLoadImportExcel() {
window.location.href = '/门店号批量开通模板.xlsx'
window.location.href = '/门店推广号批量开通模板.xlsx'
},
handleAdd(value) {
value.alias = '',
@ -569,10 +487,14 @@
value.storeId = ''
},
downloadStoreCode() {
http.downloadStoreCode({}, null);
this.loading = true;
let that = this;
http.downloadStoreCode({page:that}, null);
},
downloadStoreSellerCode() {
http.downloadStoreSellerCode({}, null);
this.loading = true;
let that = this;
http.downloadStoreSellerCode({page:that}, null);
},
updateSuccess(response) {
if (response.code === "0000") {

@ -113,12 +113,10 @@
],
userName:[
{required:true,message:'用户名不能为空',trigger:'blur'},
{ min: 1, max: 8, message: '长度在 1 到 8 个字符', trigger: 'blur' },
{ pattern: /^[\u4e00-\u9fa5_0-9a-zA-Z]+$/, message: '只可以输入数字,字母,中文',trigger: 'blur'}
],
account:[
{required:true,message:'账号不能为空',trigger:'blur'},
{ min: 2, max: 8, message: '长度在 2 到 8 个字符', trigger: 'blur' },
{ pattern: /^[0-9a-zA-Z]*$/g, message: '只可以输入数字和字母',trigger: 'blur'},
],
password:null,

@ -2,29 +2,32 @@
<div class="div-page">
<template>
<Row class="search-row">
<i-col span="18">
<span class="search-span">账户名</span>
<i-input placeholder="搜索用户名/账户" class="search-select" v-model="searchContent"/>
<span class="search-span">角色</span>
<Select filterable placeholder="请选择角色" v-model="changeRoleId" class="left-15 search-select">
<Option v-for="item in roleList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
<span class="search-span">店铺</span>
<Select filterable placeholder="请选择店铺" v-model="changeShopId" class="left-15 search-select">
<Option v-for="item in shopList" :value="item.id" :key="item.name">{{ item.name }}</Option>
</Select>
<Button type="primary" class="search-btn" @click="listAccountInfoFunction"></Button>
</i-col>
<i-col span="6" class="search-btn-add-row">
<Button type="primary"
<!-- <span class="search-span">账户名</span>-->
<i-input placeholder="搜索用户名/账户" class="left-15 search-select" :on-enter="listAccountInfoFunction" v-model="searchContent"/>
<span class="search-span">角色</span>
<Select filterable placeholder="请选择角色" v-model="selectedRoleId" class="left-15 search-select"
@on-change="onRoleChangeLister">
<Option v-for="item in roleList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
<span class="left-15 txt-font-a">零售公司</span>
<Select v-model="selectedCompanyId" filterable class="left-15 txt-font-a search-select"
@on-change="companySelect">
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
<span class="left-15 txt-font-a">店铺</span>
<Select filterable placeholder="全部" v-model="selectedShopId" class="left-15 txt-font-a search-select"
@on-change="downShopChange">
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
<Button type="primary" class="search-btn" @click="listAccountInfoFunction"></Button>
<div class="search-div-btn">
<Button type="primary" class="search-btn"
@click="addOneAccount()">+添加账户
</Button>
<!-- <Button type="primary" ghost style="margin-bottom: 20px;margin-right: 20px;float:right;margin-top: 25px"-->
<!-- @click="uploadAccount">批量导入账户-->
<!-- </Button>-->
</i-col>
<Button type="primary" class="search-btn" @click="exportData" :loading="loading">导出数据</Button>
</div>
</Row>
</template>
<Table :loading="loading" :columns="columns1" :data="data1" class="table-account" size="small"></Table>
@ -45,10 +48,14 @@
<script>
import accountManagement from "../../services/account/AccountManagement";
import zeroExtend from "../../services/customer/zeroExtend";
import staff from "../../services/staff/staff";
import IncreaseData from "../../services/generalize/IncreaseData";
export default {
data() {
return {
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
loading: false,
modal13: false,
roleList: [
@ -73,8 +80,6 @@
name: '导购',
},
],
shopList: [
],
columns1: [
{
type: 'index2',
@ -82,8 +87,7 @@
title: "序号",
align: 'center',
render: (h, params) => {
debugger
return h('span', params.index + (this.pageNum- 1) * this.pageSize + 1);
return h('span', params.index + (this.pageNum - 1) * this.pageSize + 1);
}
},
{
@ -110,6 +114,10 @@
title: '零售公司',
key: 'companyName'
},
{
title: '零售公司编码',
key: 'companyCode'
},
{
title: '店铺',
key: 'shopName'
@ -174,26 +182,28 @@
}
},
],
data1: [
],
roleId: '',
shopId: '',
data1: [],
selectedRoleId: 0,
//
totalSize: 0,
pageNum: 1,
pageSize: 10,
//
searchContent: null,
changeShopId: null,
changeRoleId: null,
searchContent: '',
updateAccountId: 0,
updateUserId: 0,
item: null,
companyList: [], //
selectedCompanyId: 0, // ID
organizationalList: [],
selectedShopId: 0, // ID
shopList: [], //
}
},
mounted: function () {
this.getSelectList();
this.listRoleInfo();
this.listOfShop();
// this.listOfShop();
// enter
this.enterKeyup();
},
@ -233,12 +243,12 @@
that.item = that.$route.query;
//
if (that.item.id === undefined) {
that.changeRoleId = "0";
that.selectedRoleId = "0";
} else {
that.changeRoleId = that.item.id;
that.selectedRoleId = that.item.id;
}
} else {
that.changeRoleId = "0";
that.selectedRoleId = "0";
}
that.listAccountInfoFunction();
}
@ -247,10 +257,9 @@
//
listOfShop() {
let that = this;
this.loading = true;
that.shopList = [];
let request = {
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId
userId: this.userId
};
accountManagement.listAllShopApi(request, function (data) {
data = data.data;
@ -264,36 +273,61 @@
id: '-1',
name: "全部"
});
that.changeShopId = '-1';
that.selectedShopId = '-1';
data = data.results;
for (let i = 0; i < data.length; i++) {
let row = data[i];
that.shopList.push(row);
}
that.listAccountInfoFunction();
}
}, function () {
that.loading = false;
});
},
//
listAccountInfoFunction: function () {
/**基础数据区域list、零售公司list、好友list*/
getSelectList: function () {
let that = this;
let roleId = that.changeRoleId;
if (that.changeRoleId === "0") {
roleId = null;
let request = {
userId: this.userId,
};
zeroExtend.getSelectListRequest(request, function (data) {
if (data.data.code !== "0000") {
that.$Message.error("系统异常");
}
data = data.data.results;
if (data) {
that.organizationalList = data;
that.companyList = that.organizationalList.filter(item => item.level === 2);
}
//
that.insertAllOption();
});
},
insertAllOption: function () {
if (this.companyList.length === 0 || this.companyList[0].id !== 0) {
this.companyList.splice(0, 0, {"id": 0, "name": "全部"});
}
let shopId = that.changeShopId;
if (that.changeShopId === "-1") {
shopId = null;
if (this.shopList.length === 0 || this.shopList[0].id !== 0) {
this.shopList.splice(0, 0, {"id": 0, "name": "全部"});
}
},
//
listAccountInfoFunction: function () {
this.loading = true;
let that = this;
let request = {
searchContent: that.searchContent,
pageNum: that.pageNum,
pageSize: that.pageSize,
roleId: roleId,
shopId: shopId
roleId: that.selectedRoleId,
companyId: that.selectedCompanyId,
shopId: that.selectedShopId
};
accountManagement.listAccountInfoApi(request, function (data) {
that.loading = false;
that.data1 = [];
data = data.data;
if (data.code === '0001') {
@ -302,7 +336,7 @@
}
if (data.code === '0000') {
if (data) {
let row = data.results.records;
let row = data.results.list;
that.totalSize = data.results.total;
for (let i = 0; i < row.length; i++) {
let entity = row[i];
@ -328,7 +362,9 @@
}
}
}
})
}, function () {
that.loading = false;
});
},
//
@ -374,18 +410,125 @@
this.listAccountInfoFunction();
}
},
//
onRoleChangeLister: function (value) {
let val = value;
},
//
companySelect: function (value) {
this.selectedCompanyId = value;
//
this.downShopData(this.selectedCompanyId);
this.selectedStore = 0;
this.shopList = [];
},
//
downShopChange: function (value) {
let val = value;
let that = this;
this.selectedStore = val;
},
downShopData: function (selected) {
let that = this;
let companyId = selected;
if (!selected) {
companyId = that.companyId;
}
let customerIds = [];
this.customerList = [];
if (companyId === 0) {
//
that.selectedShopId = 0;
} else {
this.customerList = this.organizationalList.filter(item => item.parentId === companyId && item.level === 3);
this.insertAllOption();
}
customerIds = this.customerList.map(item => item.id);
let request = {userId: that.userId, customerIds: customerIds, companyId: companyId};
staff.downShopData(request, function (data) {
data = data.data.results;
if (data) {
that.shopList = [{"id": 0, "name": "全部"}];
for (let i = 0; i < data.length; i++) {
let entity = data[i];
if (entity) {
that.shopList.push(entity);
}
}
}
})
},
//广
exportData: function () {
this.loading = true;
let that = this;
let request = {
searchContent: that.searchContent,
pageNum: that.pageNum,
pageSize: that.totalSize,
roleId: that.selectedRoleId,
companyId: that.selectedCompanyId,
shopId: that.selectedShopId
};
accountManagement.listAccountInfoApi(request, function (data) {
that.loading = false;
data = data.data;
if (data.code === '0001') {
return
}
if (data.code === '0000') {
if (data) {
let row = data.results.list;
if (row && row.length > 0) {
let originAllData = [];
for (let i = 0; i < row.length; i++) {
let entity = row[i];
entity.index = i + 1;
originAllData.push(entity);
}
let title = "账号";
require.ensure([], () => {
const {export_json_to_excel} = require('../../excel/Export2Excel');
const tHeader = ['序号', '用户名', '别名', '账号', '手机号码', '角色', '零售公司', '零售公司编码', '店铺名称', '店铺编码'];
//
const filterVal = ['index', 'userName', 'abbreviation', 'account', 'mobil', 'roleName', 'companyName', 'companyCode', 'shopName', 'shopCode'];
//
//datatableDatalist
const data = that.formatJson(filterVal, originAllData);
export_json_to_excel(tHeader, data, title);
});
}
}
}
}, function () {
that.loading = false;
});
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => v[j]))
},
},
}
</script>
<style scoped>
.left-15 {
margin-left: 15px;
}
.div-page {
margin-top: 20px;
margin-left: 20px;
}
.search-row{
.search-row {
background-color: #F7F8FA;
line-height: 80px;
}
@ -399,7 +542,7 @@
padding-right: 20px;
}
.table-account{
.table-account {
margin-top: 30px;
}
</style>

@ -103,12 +103,10 @@
addValidate: {
userName: [
{required: true, message: '用户名不能为空', trigger: 'blur'},
{min: 1, max: 8, message: '长度在 1 到 8 个字符', trigger: 'blur'},
{pattern: /^[\u4e00-\u9fa5_0-9a-zA-Z]+$/, message: '只可以输入数字,字母,中文', trigger: 'blur'}
],
account: [
{required: true, message: '账号不能为空', trigger: 'blur'},
{min: 2, max: 8, message: '长度在 2 到 8 个字符', trigger: 'blur'},
{pattern: /^[0-9a-zA-Z]*$/g, message: '只可以输入数字和字母', trigger: 'blur'},
],
mobil: [

@ -14,7 +14,8 @@ import TableAnalysis from "@/pages/TableAnalysis";
import AddCustomerTable from "@/pages/analysis/AddCustomerTable";
import ApplyCustomerTable from "@/pages/analysis/ApplyCustomerTable";
import ZeroExtendDetail from "@/pages/home/ZeroExtendDetail";
import CustomerDetail from "@/pages/home/CustomerDetail";
import CustomerDetail from "@/pages/data/CustomerDetail";
import StoreDetail from "@/pages/data/StoreDetail";
import IncreaseData from '@/pages/shop/IncreaseData';
import IncreaseDataCompany from '@/pages/shop/IncreaseDataCompany';
import IncreaseDataStaff from '@/pages/shop/IncreaseDataStaff';
@ -211,6 +212,11 @@ const router = new Router({
name: 'CustomerDetail',
component: CustomerDetail,
},
{
path: '/store/data/detail',
name: 'StoreDetail',
component: StoreDetail,
},
{
path: '/no/permission',
name: 'NoPermission',

@ -6,11 +6,11 @@ import commonUtils from '../utils/Common'
//base url
// http://mf.kiisoo.com:58080/
// axios.defaults.baseURL = 'https://wxtk.bsdits.com/kiisoo-ic/';
axios.defaults.baseURL = '/kiisoo-ic';
axios.defaults.baseURL = 'https://wxtk.bsdits.com/kiisoo-ic/';
// axios.defaults.baseURL = '/ic';
//响应时间
axios.defaults.timeout = 120000;
axios.defaults.timeout = 3600000;
axios.defaults.withCredentials=true;
//配置请求头
@ -200,7 +200,7 @@ export function downloadZip(url,filename, options = {}) {
axios({
method: 'post',
url: url, // 请求地址
data: options, // 参数
data: {}, // 参数
responseType: 'blob' // 表明返回服务器返回的数据类型
}).then(
response => {
@ -222,8 +222,10 @@ export function downloadZip(url,filename, options = {}) {
//释放内存
window.URL.revokeObjectURL(link.href)
}
options.page.loading = false
},
err => {
options.page.loading = false
reject(err)
}
)

@ -11,8 +11,8 @@ import http from '../CommonHttp'
* @param call
* @returns {Promise<any | never>}
*/
export function listAccountInfoApi(params, call) {
return http.post('account/info/list', params).then(call);
export function listAccountInfoApi(params, call, errorCallback) {
return http.post('account/info/list', params).then(call).catch(errorCallback);
}
/**
* 删除账号

@ -2,7 +2,7 @@
* 客户数据明细
*/
import http from '../CommonHttp'
import http, {downloadExcel} from '../CommonHttp'
/**
* 查询客户数据明细
@ -11,6 +11,19 @@ export function dataDetail(params, call, errorCallBack) {
return http.post('/customer/info',params).then(call).catch(errorCallBack)
}
/**
* 查询客户数据明细
*/
export function storeDataDetail(params, call, errorCallBack) {
return http.post('/store/promotion/data/behavior',params).then(call).catch(errorCallBack)
}
/**
* 查询客户数据明细
*/
export function downloadstoreDataDetailExcel(params,call) {
return http.downloadExcel('/store/promotion/data/behavior/excel','店铺号数据',params).then(call)
}
/**
* 下拉框数据导购
*/
@ -49,6 +62,8 @@ export function downCompanyData(params, call) {
export default {
dataDetail: dataDetail,
downSellerData: downSellerData,
storeDataDetail,
downloadstoreDataDetailExcel,
downShopData,
downRegionData,
editCustomerData,

@ -21,6 +21,9 @@ export function storeList(params, call, errorCallBack) {
export function addStoreWX(params, call) {
return http.post('/user/add', params).then(call);
}
export function modifyStoreWX(params, call) {
return http.post('/user/update', params).then(call);
}
export function downloadImg(params,name, call) {
return http.downloadImg('/user/img/download',name, params).then(call);
}
@ -78,6 +81,7 @@ export default {
getBaseUrl,
storeList,
addStoreWX,
modifyStoreWX,
downloadImg,
downCompanyData,
downBigRegionData,

@ -1,48 +1,36 @@
module.exports = {
/* 部署生产环境和开发环境下的URL可对当前环境进行区分baseUrl 从 Vue CLI 3.3 起已弃用要使用publicPath */
/* baseUrl: process.env.NODE_ENV === 'production' ? './' : '/' */
/* 部署生产环境和开发环境下的URL可对当前环境进行区分baseUrl 从 Vue CLI 3.3 起已弃用要使用publicPath */
/* baseUrl: process.env.NODE_ENV === 'production' ? './' : '/' */
/* 用于默认#模式 */
// publicPath: process.env.NODE_ENV === 'production' ? '/public/' : './',
/* 用于默认#模式 */
// publicPath: process.env.NODE_ENV === 'production' ? '/public/' : './',
/* history模式 */
publicPath: process.env.NODE_ENV === "production" ? "/dist/" : "/",
/* 输出文件目录在npm run build时生成文件的目录名称 */
outputDir: "dist",
/* 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录 */
assetsDir: "assets",
/* 是否在构建生产包时生成 sourceMap 文件false将提高构建速度 */
productionSourceMap: false,
/* 默认情况下,生成的静态资源在它们的文件名中包含了 hash 以便更好的控制缓存,你可以通过将这个选项设为 false 来关闭文件名哈希。(false的时候就是让原来的文件名不改变) */
filenameHashing: false,
/* 代码保存时进行eslint检测 */
lintOnSave: true,
/* webpack-dev-server 相关配置 */
devServer: {
/* 自动打开浏览器 */
open: true,
/* 设置为0.0.0.0则所有的地址均能访问 */
host: "0.0.0.0",
port: 8311,
https: false,
hotOnly: false,
disableHostCheck: true,
/* 使用代理 后台接口路径 */
// proxy: 'http://192.168.1.123:8312/'
// proxy: 'http://192.168.31.177:8312/'
proxy: "http://localhost:8312/",
// proxy: 'http://jdxdev.vipgz4.idcfengye.com/'
},
chainWebpack: (config) => {
config.module
.rule("css")
.test(/\.css$/)
.oneOf("vue")
.resourceQuery(/\?vue/)
.use("px2rem")
.loader("px2rem-loader")
.options({
remUnit: 40,
});
},
};
/* history模式 */
publicPath: process.env.NODE_ENV === 'production' ? '/dist/' : '/',
/* 输出文件目录在npm run build时生成文件的目录名称 */
outputDir: 'dist',
/* 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录 */
assetsDir: "assets",
/* 是否在构建生产包时生成 sourceMap 文件false将提高构建速度 */
productionSourceMap: false,
/* 默认情况下,生成的静态资源在它们的文件名中包含了 hash 以便更好的控制缓存,你可以通过将这个选项设为 false 来关闭文件名哈希。(false的时候就是让原来的文件名不改变) */
filenameHashing: false,
/* 代码保存时进行eslint检测 */
lintOnSave: true,
/* webpack-dev-server 相关配置 */
devServer: {
/* 自动打开浏览器 */
open: true,
/* 设置为0.0.0.0则所有的地址均能访问 */
host: '0.0.0.0',
port: 8311,
https: false,
hotOnly: false,
disableHostCheck: true,
/* 使用代理 后台接口路径 */
// proxy: 'http://192.168.1.123:8312/'
// proxy: 'http://192.168.31.177:8312/'
proxy: 'http://localhost:8312/'
// proxy: 'http://jdxdev.vipgz4.idcfengye.com/'
}
}

Loading…
Cancel
Save