|
|
|
@ -7,9 +7,18 @@
|
|
|
|
|
<i-input placeholder="请输入店铺名称或编码" style="margin-left: 10px;padding-right: 10px;" v-model="searchShop"/>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="1" style="text-align: right;">
|
|
|
|
|
<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 }}
|
|
|
|
|
</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="2" style="text-align: right;">
|
|
|
|
|
<span class="region">零售公司</span>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="4" style="padding-left: 10px;">
|
|
|
|
|
<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 }}
|
|
|
|
|
</Option>
|
|
|
|
@ -18,19 +27,19 @@
|
|
|
|
|
<i-col span="1" style="text-align: right;">
|
|
|
|
|
<span class="region">店铺</span>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="4" style="padding-left: 10px;">
|
|
|
|
|
<i-col span="3" style="padding-left: 10px;">
|
|
|
|
|
<Select v-model="selectedStore" filterable style="width: 200px;">
|
|
|
|
|
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.name }}
|
|
|
|
|
</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="2">
|
|
|
|
|
<i-col span="1" style="padding-left: 20px;">
|
|
|
|
|
<Button type="primary" @click="searchCustomerDataBtnClick">查询</Button>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="9" style="text-align: right;padding-right: 20px;">
|
|
|
|
|
<i-col span="7" style="text-align: right;padding-right: 20px;">
|
|
|
|
|
<Button type="primary" @click="downloadStoreCode" style="margin-right: 10px;">批量下载门店码</Button>
|
|
|
|
|
<Button type="primary" @click="downloadStoreSellerCode" style="margin-right: 10px;">批量下载导购码</Button>
|
|
|
|
|
<Button type="primary" @click="open()" style="margin-right: 10px;">开通门店号</Button>
|
|
|
|
|
<!--<Button type="primary" @click="open()" style="margin-right: 10px;">开通门店号</Button>-->
|
|
|
|
|
</i-col>
|
|
|
|
|
</Row>
|
|
|
|
|
</i-col>
|
|
|
|
@ -100,12 +109,12 @@
|
|
|
|
|
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{item.name}}</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</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="身份" prop="position">
|
|
|
|
|
<i-input v-model="formValidate.position" placeholder="请输入身份"></i-input>
|
|
|
|
@ -169,6 +178,7 @@
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "IncreaseStoreManager",
|
|
|
|
|
inject:['setMenuName'],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
|
|
|
|
@ -185,10 +195,12 @@
|
|
|
|
|
updateUrl: http.getBaseUrl() + "/store/emp/import",
|
|
|
|
|
downLoadStoreCodeUrl: http.getBaseUrl() + "/store/emp/download/store/code",
|
|
|
|
|
qrCodeImage: '',
|
|
|
|
|
selectedRegion: null,
|
|
|
|
|
selectedRegion: 0,
|
|
|
|
|
selectedBigRegion: 0,
|
|
|
|
|
regionList: [],
|
|
|
|
|
bigRegionList: [],
|
|
|
|
|
errorList: [],
|
|
|
|
|
selectedStore: null,
|
|
|
|
|
selectedStore: 0,
|
|
|
|
|
shopList: [],
|
|
|
|
|
rowData:{},
|
|
|
|
|
company:null,
|
|
|
|
@ -230,34 +242,34 @@
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
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
|
|
|
|
|
}*/
|
|
|
|
|
/* {
|
|
|
|
|
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
|
|
|
|
|
}*/
|
|
|
|
|
],
|
|
|
|
|
// 开通企业微信 表单
|
|
|
|
|
formValidate: {
|
|
|
|
@ -300,7 +312,9 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.setMenuName("门店推广","推广管理");
|
|
|
|
|
this.listOfStore();
|
|
|
|
|
this.downBigRegionData();
|
|
|
|
|
this.downRegionData();
|
|
|
|
|
this.downShopData();
|
|
|
|
|
},
|
|
|
|
@ -358,12 +372,12 @@
|
|
|
|
|
//区域用户下的区域
|
|
|
|
|
downRegionData: function () {
|
|
|
|
|
let that = this;
|
|
|
|
|
that.regionList = [{"id":0,"name":"全部"}];
|
|
|
|
|
let request =
|
|
|
|
|
{userId: that.userId};
|
|
|
|
|
{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){
|
|
|
|
@ -373,24 +387,46 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//区域用户下的区域
|
|
|
|
|
downBigRegionData: function () {
|
|
|
|
|
let that = this;
|
|
|
|
|
let request =
|
|
|
|
|
{userId: that.userId};
|
|
|
|
|
http.downBigRegionData(request, function (data) {
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
downRegionChange: function () {
|
|
|
|
|
this.downShopData();
|
|
|
|
|
},
|
|
|
|
|
downBigRegionChange: function () {
|
|
|
|
|
this.downRegionData();
|
|
|
|
|
// this.downShopData();
|
|
|
|
|
},
|
|
|
|
|
downCompanyChange: function (formValidate) {
|
|
|
|
|
this.downShopData(formValidate.departIds);
|
|
|
|
|
},
|
|
|
|
|
downShopData: function (selected) {
|
|
|
|
|
let that = this;
|
|
|
|
|
that.shopList = [{"id":0,"name":"全部"}];
|
|
|
|
|
let selectValue = selected;
|
|
|
|
|
if (!selected){
|
|
|
|
|
selectValue = that.selectedRegion
|
|
|
|
|
}
|
|
|
|
|
let request =
|
|
|
|
|
{userId: that.userId,companyId: that.changeData(selectValue)};
|
|
|
|
|
{userId: that.userId,companyId: that.changeData(selectValue),bigRegionId: that.changeData(that.selectedBigRegion)};
|
|
|
|
|
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){
|
|
|
|
@ -446,12 +482,12 @@
|
|
|
|
|
this.isShowError = false
|
|
|
|
|
},
|
|
|
|
|
handleSubmit (name) {
|
|
|
|
|
if (name) {
|
|
|
|
|
// 调用添加接口
|
|
|
|
|
this.addStoreWX(name);
|
|
|
|
|
} else {
|
|
|
|
|
this.$Message.error('Fail!');
|
|
|
|
|
}
|
|
|
|
|
if (name) {
|
|
|
|
|
// 调用添加接口
|
|
|
|
|
this.addStoreWX(name);
|
|
|
|
|
} else {
|
|
|
|
|
this.$Message.error('Fail!');
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleReset (name) {
|
|
|
|
|
this.$refs[name].resetFields();
|
|
|
|
@ -461,20 +497,26 @@
|
|
|
|
|
window.location.href = '/门店号批量开通模板.xlsx'
|
|
|
|
|
},
|
|
|
|
|
handleAdd(value){
|
|
|
|
|
value.alias = '',
|
|
|
|
|
value.userId = '',
|
|
|
|
|
value.gender = '',
|
|
|
|
|
value. mobile = '',
|
|
|
|
|
value.email = '',
|
|
|
|
|
value. address = '',
|
|
|
|
|
value. departIds = '',
|
|
|
|
|
value. selectedPhoneRegion ='86',
|
|
|
|
|
value.duty= '',
|
|
|
|
|
value.position='',
|
|
|
|
|
value.interest= [],
|
|
|
|
|
value.desc= '',
|
|
|
|
|
value.checkbox= ['vail'],
|
|
|
|
|
value.storeId=''
|
|
|
|
|
value.alias = '',
|
|
|
|
|
value.userId = '',
|
|
|
|
|
value.gender = '',
|
|
|
|
|
value. mobile = '',
|
|
|
|
|
value.email = '',
|
|
|
|
|
value. address = '',
|
|
|
|
|
value. departIds = '',
|
|
|
|
|
value. selectedPhoneRegion ='86',
|
|
|
|
|
value.duty= '',
|
|
|
|
|
value.position='',
|
|
|
|
|
value.interest= [],
|
|
|
|
|
value.desc= '',
|
|
|
|
|
value.checkbox= ['vail'],
|
|
|
|
|
value.storeId=''
|
|
|
|
|
},
|
|
|
|
|
downloadStoreCode(){
|
|
|
|
|
http.downloadStoreCode({},null);
|
|
|
|
|
},
|
|
|
|
|
downloadStoreSellerCode(){
|
|
|
|
|
http.downloadStoreSellerCode({},null);
|
|
|
|
|
},
|
|
|
|
|
updateSuccess (response) {
|
|
|
|
|
if (response.code === "0000") {
|
|
|
|
|