feature_0521
zhenghuang 5 years ago
commit 0aa334b34e

@ -104,7 +104,7 @@ export default {
doShow () { doShow () {
this.showStoreCheck = false this.showStoreCheck = false
this.welcome = store.getters.useData this.welcome = store.getters.useData
console.log(this.welcome); console.log('@',this.welcome);
}, },
showStores () { showStores () {
console.log({ ...store.getters.useData, ...this.welcome }) console.log({ ...store.getters.useData, ...this.welcome })
@ -116,41 +116,41 @@ export default {
this.showUpload = true; this.showUpload = true;
this.btnStr = '保存' this.btnStr = '保存'
}else{ }else{
this.initData.isGetActivityInfo = true; let _this = this;
try{ this.initData.stores = this.welcome.stores;
if(this.welcome.stores.length>0){ this.initData.company = this.welcome.company;
this.initData.stores = this.welcome.stores; let param = this.initData
} if (param.stores.length <= 0) {
}catch(e){ _this.$Message.error("请至少选择一个店铺");
console.log(e); _this.loading = false;
} return false;
}
param.isGetActivityInfo = true;
if(this.onWitch){ if(this.onWitch){
this.initData.status = 1; param.status = 1;
this.initData.stores.forEach(item => { param.stores.forEach(item => {
item.status = 1; item.status = 1;
}) })
}else{ }else{
this.initData.status = 3; param.status = 3;
this.initData.stores.forEach(item => { param.stores.forEach(item => {
item.status = 2; item.status = 2;
}) })
} }
if(this.uploadUrl != ""){ if(this.uploadUrl != ""){
this.initData.scheduleVO.params.forEach(item => { param.scheduleVO.params.forEach(item => {
item.defaultVal = item.description = this.uploadUrl; item.defaultVal = item.description = this.uploadUrl;
}) })
} }
let that = this; bulletinService.dosave(param, function (data) {
bulletinService.dosave(this.initData, function (data) {
console.log(data); console.log(data);
that.$Message.info("保存成功"); _this.$Message.info("保存成功");
that.btnStr = '编辑' _this.btnStr = '编辑'
that.showUpload = false; _this.showUpload = false;
that.reload();
}, function (err) { }, function (err) {
that.$Message.error("网络异常,请重试"); _this.$Message.error("网络异常,请重试");
that.setNoLoading(); _this.setNoLoading();
}); });
} }
}, },

Loading…
Cancel
Save