|
|
|
@ -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>
|
|
|
|
@ -199,7 +162,6 @@
|
|
|
|
|
companyList: [],
|
|
|
|
|
customerList: [],
|
|
|
|
|
companyId: 0,
|
|
|
|
|
|
|
|
|
|
errorList: [],
|
|
|
|
|
selectedStore: 0,
|
|
|
|
|
shopList: [],
|
|
|
|
@ -262,36 +224,22 @@
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
data1: [],
|
|
|
|
|
// 开通企业微信 表单
|
|
|
|
|
formValidate: {
|
|
|
|
|
alias: '',
|
|
|
|
|
userId: '',
|
|
|
|
|
gender: '',
|
|
|
|
|
id: '',
|
|
|
|
|
cpUserId: '',
|
|
|
|
|
mobile: '',
|
|
|
|
|
email: '',
|
|
|
|
|
address: '',
|
|
|
|
|
departIds: '',
|
|
|
|
|
selectedPhoneRegion: '86',
|
|
|
|
|
duty: '',
|
|
|
|
|
position: '',
|
|
|
|
|
interest: [],
|
|
|
|
|
desc: '',
|
|
|
|
|
checkbox: ['vail'],
|
|
|
|
|
storeId: '',
|
|
|
|
|
cpUserName: '',
|
|
|
|
|
shopName: ''
|
|
|
|
|
},
|
|
|
|
|
ruleValidate: {
|
|
|
|
|
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'}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -300,8 +248,6 @@
|
|
|
|
|
this.setMenuName("门店推广", "推广管理");
|
|
|
|
|
this.listOfStore();
|
|
|
|
|
this.getSelectList();
|
|
|
|
|
// this.downBigRegionData();
|
|
|
|
|
// this.downRegionData();
|
|
|
|
|
this.downShopData();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -344,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);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -493,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 () {
|
|
|
|
|
|
|
|
|
@ -504,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!');
|
|
|
|
|
}
|
|
|
|
|