|
|
|
@ -10,8 +10,8 @@
|
|
|
|
|
<span class="region">大区</span>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="3" style="padding-left: 10px;">
|
|
|
|
|
<Select v-model="selectedBigRegion" filterable style="width: 200px;" @on-change="downBigRegionChange" >
|
|
|
|
|
<Option v-for="item in bigRegionList" :value="item.id" :key="item.id">{{ item.name }}
|
|
|
|
|
<Select v-model="regionId" filterable style="width: 200px;" @on-change="regionSelect" >
|
|
|
|
|
<Option v-for="item in regionList" :value="item.id" :key="item.id">{{ item.name }}
|
|
|
|
|
</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</i-col>
|
|
|
|
@ -19,8 +19,8 @@
|
|
|
|
|
<span class="region">零售公司</span>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="3" style="padding-left: 10px;">
|
|
|
|
|
<Select v-model="selectedRegion" filterable style="width: 200px;" @on-change="downRegionChange" >
|
|
|
|
|
<Option v-for="item in regionList" :value="item.id" :key="item.id">{{ item.name }}
|
|
|
|
|
<Select v-model="companyId" filterable style="width: 200px;" @on-change="companySelect" >
|
|
|
|
|
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}
|
|
|
|
|
</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</i-col>
|
|
|
|
@ -46,10 +46,10 @@
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<Table :columns="columns1" :data="data1" style="margin-top: 20px;">
|
|
|
|
|
<template slot-scope="{ row, index }" slot="qrCodeAction">
|
|
|
|
|
<template slot-scope="row" slot="qrCodeAction">
|
|
|
|
|
<img :src="require('../../../static/img/qrCode-init.png')" @click="show(row)" @mouseover="show(row)" style="margin-left: 5px;margin-top: 5px;width:30px;height:30px;"/>
|
|
|
|
|
</template>
|
|
|
|
|
<router-link slot-scope="{ row, index }" slot="action" :to="{path:'/shop/increase/manager/staff',query:{storeId:row.id}}">
|
|
|
|
|
<router-link slot-scope="row" slot="action" :to="{path:'/shop/increase/manager/staff',query:{storeId:row.id}}">
|
|
|
|
|
<Button ghost style="border:0px;color: #2074E2;"> 门店导购管理</Button>
|
|
|
|
|
</router-link>
|
|
|
|
|
</Table>
|
|
|
|
@ -175,6 +175,7 @@
|
|
|
|
|
import data from '../../utils/PhoneRegionData';
|
|
|
|
|
import http from '../../services/store/IncreaseStoreManager';
|
|
|
|
|
import staff from "../../services/staff/staff";
|
|
|
|
|
import zeroExtend from "../../services/customer/zeroExtend";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "IncreaseStoreManager",
|
|
|
|
@ -197,8 +198,15 @@
|
|
|
|
|
qrCodeImage: '',
|
|
|
|
|
selectedRegion: 0,
|
|
|
|
|
selectedBigRegion: 0,
|
|
|
|
|
//所有组织list
|
|
|
|
|
organizationalList: [],
|
|
|
|
|
//区域list
|
|
|
|
|
regionList: [],
|
|
|
|
|
bigRegionList: [],
|
|
|
|
|
regionId: 0,
|
|
|
|
|
//零售公司list
|
|
|
|
|
companyList: [],
|
|
|
|
|
companyId: 0,
|
|
|
|
|
|
|
|
|
|
errorList: [],
|
|
|
|
|
selectedStore: 0,
|
|
|
|
|
shopList: [],
|
|
|
|
@ -313,15 +321,13 @@
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.setMenuName("门店推广","推广管理");
|
|
|
|
|
this.listOfStore();
|
|
|
|
|
this.downBigRegionData();
|
|
|
|
|
this.downRegionData();
|
|
|
|
|
this.downShopData();
|
|
|
|
|
// this.listOfStore();
|
|
|
|
|
this.getSelectList();
|
|
|
|
|
// this.downBigRegionData();
|
|
|
|
|
// this.downRegionData();
|
|
|
|
|
// this.downShopData();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
onChangeDateLister: function () {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
searchCustomerDataBtnClick: function () {
|
|
|
|
|
this.listOfStore();
|
|
|
|
|
},
|
|
|
|
@ -369,48 +375,51 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//区域用户下的区域
|
|
|
|
|
downRegionData: function () {
|
|
|
|
|
let that = this;
|
|
|
|
|
let request =
|
|
|
|
|
{userId: that.userId, bigRegionId: that.selectedBigRegion};
|
|
|
|
|
http.downCompanyData(request, function (data) {
|
|
|
|
|
data = data.data.results;
|
|
|
|
|
if(data){
|
|
|
|
|
that.regionList = [{"id":0,"name":"全部"}];
|
|
|
|
|
for(let i=0;i<data.length;i++){
|
|
|
|
|
let entity = data[i];
|
|
|
|
|
if(entity){
|
|
|
|
|
that.regionList.push(entity);
|
|
|
|
|
}
|
|
|
|
|
//插入全部选项
|
|
|
|
|
insertAllOption: function(){
|
|
|
|
|
if(this.regionList.length === 0 || this.regionList[0].id !== 0){
|
|
|
|
|
this.regionList.splice(0,0, {"id":0, "name":"全部"});
|
|
|
|
|
}
|
|
|
|
|
if(this.companyList.length === 0 || this.companyList[0].id !== 0){
|
|
|
|
|
this.companyList.splice(0, 0, {"id":0, "name":"全部"});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//区域用户下的区域
|
|
|
|
|
downBigRegionData: function () {
|
|
|
|
|
/**基础数据:区域list、零售公司list、客户list*/
|
|
|
|
|
getSelectList:function(){
|
|
|
|
|
let that = this;
|
|
|
|
|
let request =
|
|
|
|
|
{userId: that.userId};
|
|
|
|
|
http.downBigRegionData(request, function (data) {
|
|
|
|
|
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.bigRegionList = [{"id":0,"name":"全部"}];
|
|
|
|
|
for(let i=0;i<data.length;i++){
|
|
|
|
|
let entity = data[i];
|
|
|
|
|
if(entity){
|
|
|
|
|
that.bigRegionList.push(entity);
|
|
|
|
|
}
|
|
|
|
|
that.organizationalList = data;
|
|
|
|
|
that.regionList = that.organizationalList.filter(item => item.level === 1);
|
|
|
|
|
that.companyList = that.organizationalList.filter(item => item.level === 2);
|
|
|
|
|
}
|
|
|
|
|
//插入全部选项
|
|
|
|
|
that.insertAllOption();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//区域选择
|
|
|
|
|
regionSelect: function(){
|
|
|
|
|
let regionId = this.regionId;
|
|
|
|
|
if(regionId === 0){
|
|
|
|
|
this.companyList = this.organizationalList.filter(item => item.level === 2);
|
|
|
|
|
}else{
|
|
|
|
|
this.companyList = this.organizationalList.filter(item => item.parentId === regionId && item.level === 2);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
downRegionChange: function () {
|
|
|
|
|
this.downShopData();
|
|
|
|
|
this.insertAllOption();
|
|
|
|
|
this.companyId = 0;
|
|
|
|
|
//加载店铺
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
downBigRegionChange: function () {
|
|
|
|
|
this.downRegionData();
|
|
|
|
|
// this.downShopData();
|
|
|
|
|
//零售公司选择
|
|
|
|
|
companySelect: function(){
|
|
|
|
|
//加载店铺
|
|
|
|
|
},
|
|
|
|
|
downCompanyChange: function (formValidate) {
|
|
|
|
|
this.downShopData(formValidate.departIds);
|
|
|
|
@ -454,7 +463,7 @@
|
|
|
|
|
let fileName = index.name + "-门店码";
|
|
|
|
|
http.downloadImg({
|
|
|
|
|
url:index.qrCodeAction
|
|
|
|
|
},fileName,function (data) {
|
|
|
|
|
},fileName,function (/*data*/) {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|