|
|
|
@ -353,13 +353,39 @@
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
addStoreWX: function (request) {
|
|
|
|
|
if (request.name == null || request.name === ""){
|
|
|
|
|
this.$Message.error('名称不能为空');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (request.alias == null || request.alias === ""){
|
|
|
|
|
this.$Message.error('别名不能为空');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (request.userId == null || request.userId === ""){
|
|
|
|
|
this.$Message.error('账号不能为空');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (request.mobile == null || request.mobile === ""){
|
|
|
|
|
this.$Message.error('手机号不能为空');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let reg = new RegExp("^[1][3-8][0-9]{9}$");
|
|
|
|
|
if (request.mobile != null && request.mobile != "" && !reg.test(request.mobile)){
|
|
|
|
|
this.$Message.error('手机号码格式不正确');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (request.storeId == null || request.storeId === ""){
|
|
|
|
|
this.$Message.error('所属店铺不能为空');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let that = this;
|
|
|
|
|
http.addStoreWX(request, function (data) {
|
|
|
|
|
data = data.data;
|
|
|
|
|
if (data.results == "0000") {
|
|
|
|
|
that.$Message.success('添加成功!');
|
|
|
|
|
that.listOfStore();
|
|
|
|
|
this.handleAdd(this.formValidate);
|
|
|
|
|
that.handleAdd(that.formValidate);
|
|
|
|
|
this.$refs['formValidate'].resetFields();
|
|
|
|
|
}else if (data.results == "0001") {
|
|
|
|
|
that.$Message.error('系统错误');
|
|
|
|
|
}else if (data.results == "0002") {
|
|
|
|
@ -585,20 +611,21 @@
|
|
|
|
|
window.location.href = '/门店推广号批量开通模板.xlsx'
|
|
|
|
|
},
|
|
|
|
|
handleAdd(value) {
|
|
|
|
|
value.alias = '',
|
|
|
|
|
value.userId = '',
|
|
|
|
|
value.gender = '',
|
|
|
|
|
value.mobile = '',
|
|
|
|
|
value.email = '',
|
|
|
|
|
value.address = '',
|
|
|
|
|
value.departIds = '',
|
|
|
|
|
value.name = "",
|
|
|
|
|
value.alias = "",
|
|
|
|
|
value.userId = "",
|
|
|
|
|
value.gender = "",
|
|
|
|
|
value.mobile = "",
|
|
|
|
|
value.email = "",
|
|
|
|
|
value.address = "",
|
|
|
|
|
value.departIds = "",
|
|
|
|
|
value.selectedPhoneRegion = '86',
|
|
|
|
|
value.duty = '',
|
|
|
|
|
value.position = '',
|
|
|
|
|
value.duty = "",
|
|
|
|
|
value.position = "",
|
|
|
|
|
value.interest = [],
|
|
|
|
|
value.desc = '',
|
|
|
|
|
value.desc = "",
|
|
|
|
|
value.checkbox = ['vail'],
|
|
|
|
|
value.storeId = ''
|
|
|
|
|
value.storeId = ""
|
|
|
|
|
},
|
|
|
|
|
downloadStoreCode() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|