|
|
|
@ -432,10 +432,14 @@ export default {
|
|
|
|
|
console.info("oldval:" + oldVal) |
|
|
|
|
if (val) { |
|
|
|
|
this.getInfoChooseGood(val) |
|
|
|
|
this.getInfo() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
// created() { |
|
|
|
|
// this.getInfoChooseGood(this.form1.good.productId) |
|
|
|
|
// }, |
|
|
|
|
mounted() { |
|
|
|
|
this.getInfo(); |
|
|
|
|
}, |
|
|
|
@ -623,8 +627,11 @@ export default {
|
|
|
|
|
let cate_id = parseInt(data.cate_id) || 0; |
|
|
|
|
this.attrs = data.items || []; |
|
|
|
|
that.formValidate = data; |
|
|
|
|
if(data.linkImage==null||data.linkImage){ |
|
|
|
|
// console.log('调用?',data) |
|
|
|
|
if(data.linkImage==null||data.linkImage==undefined){ |
|
|
|
|
that.formValidate.linkImage='' |
|
|
|
|
}else { |
|
|
|
|
that.formValidate.linkImage=data.linkImage |
|
|
|
|
} |
|
|
|
|
that.formValidate.cate_id = cate_id; |
|
|
|
|
that.oneFormValidate = [data.attr]; |
|
|
|
@ -670,6 +677,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
// 提交 |
|
|
|
|
handleSubmit(name) { |
|
|
|
|
console.log("!this.$route.params.id",!this.$route.params.id); |
|
|
|
|
this.$refs[name].validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
if (this.formValidate.spec_type === 0) { |
|
|
|
@ -694,7 +702,9 @@ export default {
|
|
|
|
|
type: 'success' |
|
|
|
|
}); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.resetForm() |
|
|
|
|
if (!this.$route.params.id){ |
|
|
|
|
this.resetForm() //新增清除缓存 |
|
|
|
|
} |
|
|
|
|
this.$router.push({path: '/bxg/activity/combination'}); |
|
|
|
|
}, 500); |
|
|
|
|
}).catch(res => { |
|
|
|
@ -711,6 +721,16 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
resetForm(){ |
|
|
|
|
this.$refs['formValidate'].resetFields() |
|
|
|
|
this.form1={ |
|
|
|
|
good: { |
|
|
|
|
productId: null, |
|
|
|
|
storeName: null, |
|
|
|
|
image: null, |
|
|
|
|
otPrice: null, |
|
|
|
|
price: null, |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
this.oneFormValidate=[ |
|
|
|
|
{ |
|
|
|
|
imageArr: [], |
|
|
|
|