diff --git a/src/pages/shop/IncreaseStoreManager.vue b/src/pages/shop/IncreaseStoreManager.vue
index 4d4b996..0d4d8c7 100644
--- a/src/pages/shop/IncreaseStoreManager.vue
+++ b/src/pages/shop/IncreaseStoreManager.vue
@@ -31,10 +31,10 @@
-
-
-
+
+
+
+
@@ -63,60 +63,23 @@
开通企业微信号
@@ -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!');
}
diff --git a/src/services/store/IncreaseStoreManager.js b/src/services/store/IncreaseStoreManager.js
index 8da0563..c6fd64a 100644
--- a/src/services/store/IncreaseStoreManager.js
+++ b/src/services/store/IncreaseStoreManager.js
@@ -21,6 +21,9 @@ export function storeList(params, call, errorCallBack) {
export function addStoreWX(params, call) {
return http.post('/user/add', params).then(call);
}
+export function modifyStoreWX(params, call) {
+ return http.post('/user/update', params).then(call);
+}
export function downloadImg(params,name, call) {
return http.downloadImg('/user/img/download',name, params).then(call);
}
@@ -78,6 +81,7 @@ export default {
getBaseUrl,
storeList,
addStoreWX,
+ modifyStoreWX,
downloadImg,
downCompanyData,
downBigRegionData,