修改问题。

master
kevin jiang 6 years ago
parent 79781543c7
commit 4a76ae2122

@ -14,6 +14,11 @@ Vue.prototype.$qs = QS;
Vue.prototype.$moment = moment; Vue.prototype.$moment = moment;
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$moment = moment; Vue.prototype.$moment = moment;
import echarts from 'echarts';
import 'echarts/map/js/china'
Vue.prototype.$echarts = echarts;
// 需要汉化 // 需要汉化
moment.locale('zh-cn'); moment.locale('zh-cn');

@ -34,7 +34,7 @@
</row> </row>
<row> <row>
<Table ref="table" :columns="columns1" :data="data1" style="margin-top: 20px;" size="small" <Table ref="table" :loading="loading" :columns="columns1" :data="data1" style="margin-top: 20px;" size="small"
no-data-text="--"></Table> no-data-text="--"></Table>
</row> </row>
<Modal v-model="modal12" draggable scrollable title="好友信息" :width="vipModalWidth+'px'" <Modal v-model="modal12" draggable scrollable title="好友信息" :width="vipModalWidth+'px'"
@ -140,6 +140,7 @@
inject: ['checkParamBlank'], inject: ['checkParamBlank'],
data() { data() {
return { return {
loading: false,
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId, userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
// //
totalSize: null, totalSize: null,
@ -243,17 +244,6 @@
}*/ }*/
], ],
data1: [ data1: [
{
id: 1,
customerName: '会员名称',
customerPhone: '会员手机',
seller: '会员导购',
vipName: 'vip名称',
salesNum: '消费次数',
salesAmt: '消费金额',
vipLevel: '会员等级',
vipBirth: '会员生日'
},
] ]
} }
}, },
@ -375,6 +365,7 @@
}, },
getCustomerData: function () { getCustomerData: function () {
let that = this; let that = this;
this.loading = true;
that.data1 = []; that.data1 = [];
let stdate = null; let stdate = null;
let eddate = null; let eddate = null;
@ -396,7 +387,7 @@
}; };
customerDetail.dataDetail(request, function (data) { customerDetail.dataDetail(request, function (data) {
that.data1 = []; that.data1 = [];
that.loading = false;
data = data.data.results; data = data.data.results;
if (data) { if (data) {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
@ -417,7 +408,9 @@
} }
} }
}) }, function () {
that.loading = false;
});
}, },
downSellerData: function () { downSellerData: function () {
let that = this; let that = this;

@ -18,14 +18,17 @@
<Menu ref="menu" :active-name="selectedItemName" :open-names="openName" theme="dark" width="auto" <Menu ref="menu" :active-name="selectedItemName" :open-names="openName" theme="dark" width="auto"
@on-select="onSelectLister" :accordion="true"> @on-select="onSelectLister" :accordion="true">
<MenuItem v-if="roleCode === 'GLY-ADMIN' || roleCode === 'DG-YUNYING' || roleCode === 'GL-YUNYING'" :name="0" to="/customer/view">
<Icon type="ios-paper"/>
<span style="margin-left: 7px">首页</span>
</MenuItem>
<Submenu :name="item.id" v-for="item in onePermissionList" :key="item.id"> <Submenu :name="item.id" v-for="item in onePermissionList" :key="item.id">
<template slot="title"> <template slot="title">
<Icon type="ios-paper"/> <Icon type="ios-paper"/>
{{item.name}} {{item.name}}
</template> </template>
<MenuItem :name="cItem.id" :to="cItem.resource" v-for="cItem in item.subMenuList" <MenuItem :name="cItem.id" :to="cItem.resource" v-for="cItem in item.subMenuList"
:key="cItem.id" :target="cItem.name === '大屏' ? '_blank' : '_self'"> :key="cItem.id">
{{cItem.name}} {{cItem.name}}
</MenuItem> </MenuItem>
</Submenu> </Submenu>
@ -61,6 +64,7 @@
data() { data() {
return { return {
roleCode: JSON.parse(sessionStorage.getItem("loginInfo")).roleCode, roleCode: JSON.parse(sessionStorage.getItem("loginInfo")).roleCode,
mainUrl: "/customer/view",
isCollapsed: false, isCollapsed: false,
mHeight: 600, mHeight: 600,
selectedItemName: "", selectedItemName: "",
@ -111,25 +115,34 @@
}, },
methods: { methods: {
//
onSelectLister(val) { onSelectLister(val) {
let i;
this.onePermissionList.forEach(function (data) {
data.subMenuList.forEach(function (dta) {
if(dta.id === val){
i = dta;
}
})
});
if(i){
sessionStorage.setItem("threeLevel",JSON.stringify(i.subMenuList));
}
//
if(val === 0){
this.selectedMenu = "首页";
this.selectedSubMenu = "";
this.breadcrumbUrl = this.mainUrl;
}
for (let i = 0; i < this.onePermissionList.length; i++) { for (let i = 0; i < this.onePermissionList.length; i++) {
let item = this.onePermissionList[i]; let item = this.onePermissionList[i];
for (let k = 0; k < item.subMenuList.length; k++) { for (let k = 0; k < item.subMenuList.length; k++) {
let cItem = item.subMenuList[k]; let cItem = item.subMenuList[k];
if (cItem.id === val) { if (cItem.id === val) {
if(cItem.name === '大屏'){
this.$router.push("")
}
this.selectedMenu = item.name; this.selectedMenu = item.name;
this.selectedSubMenu = cItem.name; this.selectedSubMenu = cItem.name;
this.selectedItemName = cItem.id; this.selectedItemName = cItem.id;
this.breadcrumbUrl = cItem.resource; this.breadcrumbUrl = cItem.resource;
// 3
sessionStorage.setItem("threeLevel",JSON.stringify(cItem.subMenuList));
} }
} }
} }
@ -245,18 +258,25 @@
// //
menuInit: function () { menuInit: function () {
let that = this; let that = this;
if(this.roleCode === 'GLY-ADMIN' || this.roleCode === 'DG-YUNYING' || this.roleCode === 'GL-YUNYING'){
//
that.selectedItemName = 0;
this.$router.push({path: that.mainUrl});
this.selectedMenu = "首页";
this.breadcrumbUrl = this.mainUrl;
}else{
that.selectedItemName = that.onePermissionList[0].subMenuList[0].id; that.selectedItemName = that.onePermissionList[0].subMenuList[0].id;
that.openName = [that.onePermissionList[0].id]; that.openName = [that.onePermissionList[0].id];
this.selectedMenu = this.onePermissionList[0].name; this.selectedMenu = this.onePermissionList[0].name;
this.selectedSubMenu = this.onePermissionList[0].subMenuList[0].name; this.selectedSubMenu = this.onePermissionList[0].subMenuList[0].name;
sessionStorage.setItem("threeLevel",JSON.stringify(this.onePermissionList[0].subMenuList[0].subMenuList)); sessionStorage.setItem("threeLevel",JSON.stringify(this.onePermissionList[0].subMenuList[0].subMenuList));
this.$nextTick(() => { // this.$nextTick(() => {
this.$refs.menu.updateOpened(); // this.$refs.menu.updateOpened();
// this.$refs.menu.updateActiveName(); // this.$refs.menu.updateActiveName();
}); // });
this.$router.push({path: that.onePermissionList[0].subMenuList[0].resource}); this.$router.push({path: that.onePermissionList[0].subMenuList[0].resource});
}
}, },
// //

@ -6,15 +6,15 @@
<i-input placeholder="店铺名称或编码" class="search-select" v-model="searchShop"/> <i-input placeholder="店铺名称或编码" class="search-select" v-model="searchShop"/>
<span class="search-span">大区</span> <span class="search-span">大区</span>
<Select v-model="regionId" filterable class="search-select" @on-change="regionSelect"> <Select v-model="regionId" filterable class="search-select" @on-change="regionSelect">
<Option v-for="item in regionList" :value="item.id" :key="item.id">{{ item.name }}</Option> <Option v-for="(item,index) in regionList" :value="item.id" :key=" index + item.id">{{ item.name }}</Option>
</Select> </Select>
<span class="search-span">零售公司</span> <span class="search-span">零售公司</span>
<Select v-model="companyId" filterable class="search-select" @on-change="companySelect"> <Select v-model="companyId" filterable class="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="index + item.id">{{ item.name }}</Option>
</Select> </Select>
<span class="search-span">店铺</span> <span class="search-span">店铺</span>
<Select v-model="selectedStore" filterable class="search-select"> <Select v-model="selectedStore" filterable class="search-select">
<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="index + item.id">{{ item.name }}</Option>
</Select> </Select>
<Button type="primary" @click="searchCustomerDataBtnClick" class="search-btn">查询</Button> <Button type="primary" @click="searchCustomerDataBtnClick" class="search-btn">查询</Button>
<Button type="primary" @click="downloadStoreCode" style="margin-left: 20px;">批量下载门店码</Button> <Button type="primary" @click="downloadStoreCode" style="margin-left: 20px;">批量下载门店码</Button>
@ -375,6 +375,7 @@
that.data1 = datas.list; that.data1 = datas.list;
} }
}, function (error) { }, function (error) {
debugger
that.loading = false; that.loading = false;
}); });
}, },

@ -7,8 +7,8 @@ import commonUtils from '../utils/Common'
// http://mf.kiisoo.com:58080/ // http://mf.kiisoo.com:58080/
// axios.defaults.baseURL = 'http://mf.kiisoo.com:58080/gds/api'; // axios.defaults.baseURL = 'http://mf.kiisoo.com:58080/gds/api';
axios.defaults.baseURL = 'https://wxtk.bsdits.com/kiisoo-ic/'; // axios.defaults.baseURL = 'https://wxtk.bsdits.com/kiisoo-ic/';
// axios.defaults.baseURL = '/kiisoo-ic'; axios.defaults.baseURL = '/kiisoo-ic';
//响应时间 //响应时间
axios.defaults.timeout = 120000; axios.defaults.timeout = 120000;

@ -7,8 +7,8 @@ import http from '../CommonHttp'
/** /**
* 查询客户数据明细 * 查询客户数据明细
*/ */
export function dataDetail(params, call) { export function dataDetail(params, call, errorCallBack) {
return http.post('/customer/info',params).then(call) return http.post('/customer/info',params).then(call).catch(errorCallBack)
} }
/** /**

@ -28,7 +28,9 @@ module.exports = {
hotOnly: false, hotOnly: false,
disableHostCheck: true, disableHostCheck: true,
/* 使用代理 后台接口路径 */ /* 使用代理 后台接口路径 */
proxy: 'http://192.168.1.163:8048/' // proxy: 'http://192.168.1.123:8312/'
// proxy: 'http://192.168.31.177:8312/'
proxy: 'http://localhost:8312/'
// proxy: 'http://jdxdev.vipgz4.idcfengye.com/' // proxy: 'http://jdxdev.vipgz4.idcfengye.com/'
}, },
chainWebpack: config => { chainWebpack: config => {

Loading…
Cancel
Save