修复:供应商 - 商品编辑信息提交后出现错误提示,但是信息编辑成功的问题
This commit is contained in:
parent
27476d2875
commit
d14ed78653
|
|
@ -1888,10 +1888,7 @@ export default {
|
||||||
window.history.back()
|
window.history.back()
|
||||||
},
|
},
|
||||||
handleCloseCoupon(tag) {
|
handleCloseCoupon(tag) {
|
||||||
this.formValidate.couponData.splice(
|
this.formValidate.couponData.splice(this.formValidate.couponData.indexOf(tag), 1)
|
||||||
this.formValidate.couponData.indexOf(tag),
|
|
||||||
1
|
|
||||||
)
|
|
||||||
this.formValidate.give_coupon_ids = []
|
this.formValidate.give_coupon_ids = []
|
||||||
this.formValidate.couponData.map(item => {
|
this.formValidate.couponData.map(item => {
|
||||||
this.formValidate.give_coupon_ids.push(item.coupon_id)
|
this.formValidate.give_coupon_ids.push(item.coupon_id)
|
||||||
|
|
@ -2289,9 +2286,7 @@ export default {
|
||||||
zh_uploadFile_change(evfile) {
|
zh_uploadFile_change(evfile) {
|
||||||
const that = this
|
const that = this
|
||||||
that.progress = 10
|
that.progress = 10
|
||||||
const suffix = evfile.target.files[0].name.substr(
|
const suffix = evfile.target.files[0].name.substr(evfile.target.files[0].name.indexOf('.'))
|
||||||
evfile.target.files[0].name.indexOf('.')
|
|
||||||
)
|
|
||||||
if (suffix !== '.mp4') {
|
if (suffix !== '.mp4') {
|
||||||
return that.$message.error('只能上传MP4文件')
|
return that.$message.error('只能上传MP4文件')
|
||||||
}
|
}
|
||||||
|
|
@ -2847,22 +2842,23 @@ export default {
|
||||||
this.fullscreenLoading = true;
|
this.fullscreenLoading = true;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let disCreate = this.$route.params.id && !this.$route.query.type;
|
let disCreate = this.$route.params.id && !this.$route.query.type;
|
||||||
disCreate
|
if(disCreate){
|
||||||
? productUpdateApi(this.$route.params.id, this.formValidate)
|
productUpdateApi(this.$route.params.id, this.formValidate)
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
this.fullscreenLoading = false;
|
this.fullscreenLoading = false;
|
||||||
this.$message.success(res.message);
|
this.$message.success(res.message);
|
||||||
this.$router.push({path: this.roterPre + "/product/list"});
|
this.$router.push({path: this.roterPre + "/product/list"});
|
||||||
this.$refs[name].resetFields();
|
// this.$refs[name].resetFields();
|
||||||
this.formValidate.slider_image = [];
|
// this.formValidate.slider_image = [];
|
||||||
this.loading = false;
|
// this.loading = false;
|
||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
this.fullscreenLoading = false;
|
this.fullscreenLoading = false;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
})
|
})
|
||||||
: productCreateApi(this.formValidate)
|
}else{
|
||||||
|
productCreateApi(this.formValidate)
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
this.fullscreenLoading = false;
|
this.fullscreenLoading = false;
|
||||||
this.$message.success(res.message);
|
this.$message.success(res.message);
|
||||||
|
|
@ -2874,6 +2870,7 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!this.formValidate.store_name.trim()) {
|
if (!this.formValidate.store_name.trim()) {
|
||||||
return this.$message.warning("基本信息-商品名称不能为空");
|
return this.$message.warning("基本信息-商品名称不能为空");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue