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